Quantcast
Channel: Power Query topics
Viewing all articles
Browse latest Browse all 31144

How to Authenticate to a REST API with basic Authentication in Power BI Blank Query

$
0
0

I have a need to access a REST API (JSON) to access data in CSV format.

 

https://apiURL/apps/api/batch-query/

 

With Header as follows:

 

Authorization = "Basic <encoded username : password>"

Content-Type = "application/json"

 

My code is as follows:

 

let
 source = #!"Json.Document(Web.Contents(""https://apiURL.com/apps/api/batch- query/"", [#Authentication=""Basic <encoded username : password""]))"
in
 source

 

I receive error saying the header authorization can not be used. Most examples I have seen are using token/key, this API does not have that capability. Using a REST Client the call works just fine.

 

Is there a simple way to make a connection to the API with basic Auth, I need to do a POST, GET, GET (each requests will use a value from the previous request.

 

Thanks


Viewing all articles
Browse latest Browse all 31144

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>