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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

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
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

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.