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

Problems with JSON API Connection

So I have a service that has API functionality but the authentication requires more than my basic knowledge of this. The API support is no help so I am stuck figuring this out myself.

 

Auth Request URL:

https://{API Key}:{Password}@api.xxxx.com/{API Endpoint}

Some details:

APIKey = "1234567" Password = "abcdefghijklmon"

Should be specified: 

Content-Typeheaderapplication/json; charset=utf-8 and an

Acceptheaderapplication/json.

 

I have tried 

 

= Web.Contents("https://api.xxxx.com/api/" & "{API Endpoint}", [Headers=[ContentType="application/json; charset=utf-8", Accept="application/json", #"API Key"="1234567", #"Password"="abcdefghijklmon"]])

 

and 

 

= Web.Contents("https://1234567:abcdefghijklmon@api.xxxx.com/api/" & "{API Endpoint}", [Headers=[ContentType="application/json; charset=utf-8", Accept="application/json"]])

 

But they both did not work. 

 

1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

If you are not familiar with the code, you could use UI to connect to.

There are some references.

Calling REST APIs and Parsing JSON made simple with Power BI

Power BI – Connect to your secure API

If you have any problem, please let me know.

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

Top Solution Authors