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