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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Power Query Web API with Session Key

Hello,

 

I am trying to connect Power BI to our ticketing system API to get ticketing data for a Power BI report.  I am using Power Query Advanced Editor to write the code to connect to the API POST.

 

Here is my code to connect to the API:

 

TSTUTZMAN_1-1700176108717.png

 

I have used the API Reference guide to build this code just like their examples and I keep getting either two errors. 

First error: 

TSTUTZMAN_2-1700176403348.png

When I set Cookie equal to sessionKey={created api key}

 

Second error:

I thought the API didn't like the text "sessionKey" in the header so I took it out and changed it to this:

TSTUTZMAN_4-1700176760165.png

and get this error

TSTUTZMAN_3-1700176605602.png

I have tried multiple modifications and cannot get it to work.  I am using Anonymous access currently.  I tried using Web API access and get this error when I enter in the API Key.

TSTUTZMAN_5-1700176984899.png

 

Any help would be appreciated.

Thanks,

Tim

 

 

 

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

Please check the documentation for the proper format

 

Web.Contents - PowerQuery M | Microsoft Learn

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.