cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
Community Support
Community Support

Re: Problems with JSON API Connection

Hi @alu3233 

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Community Summit Australia – Join Online!

Community Summit Australia – Join Online!

Be a part of the leading Microsoft Business Applications digital event, curated for the APAC community.

Top Solution Authors