Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
kcdavi01
Frequent Visitor

POST API call using Power Query M - Help

Hi all,

 

Hope all is well! Im trying to connect to data via an API Post request. Im going through Power Query M to gather the data but fairly new at it.

 

My query looks like the below (XXX are replacing passwords/sensitivity) but I get the following error message:

Query:

kcdavi01_0-1715709359565.png

 

Error Message:

Expression.Error: The 'Ocp-Apim-Subscription-Key' header is only supported when connecting anonymously. These headers can be used with all authentication types: Accept, Accept-Charset, Accept-Encoding, Accept-Language, Cache-Control, Content-Type, If-Modified-Since, Prefer, Range, Referer

kcdavi01_0-1715709588500.png

 

 

Im I not entering the right query to run? How can I connect anonymously? Any help would be highly appreciated! Thanks in advance!

2 REPLIES 2
Anonymous
Not applicable

Hi @kcdavi01 

If you have the related key, you can consider to select web connector when importing data.

vxinruzhumsft_0-1715739046795.png

Then click advanced , and refer to the following picture.

vxinruzhumsft_1-1715739574038.png

 

You can refer to the following link.

https://wisedatadecisions.com/2021/05/03/parameterize-an-api-request-in-power-query/

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Yolo Zhu,

 

I hope all is well! Thank you for providing that info! I did find it to be good knowledge!

 

However, it looks like this information is for API requests that use a GET function. I would like to use a POST function and I don’t think the traditional Web connector will work.

 

Im using Power Query M to write my POST request but ran into issues such as having to connect anonymously. Is this something you’ve encountered before?

 

Thanks in advance and appreciate your help!!

 

 

Best,

Kcdavi01

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors