Forum Discussion

ALean's avatar
ALean
Frequent Visitor
7 years ago

Simple API authenticated with bearer token not working in Power BI, but is in Postman

I wish to consume a simple API which is only authenticated with a bearer token.

This works perfectly when done in Postman.

 

I cannot figure out why Power BI cannot authenticate it.
Anonymous: "We couldn't authenticate with the credentials provided. Please try again"
Web API: "A web API key can only be specified when a web API key name is provided."


 Figure: API Url with Authoirzation token reflecting the working version in Postman

 

I have also attempted to do this using the advanced editor from a blank query and still cannot authenticate.

 

let
     apiUrl = "https://api.**********/2.0/items",
     options = [Headers=[#"Authorization"="Bearer *************************************************"]],
     result = Web.Contents(apiUrl , options)
in
     result

 

2 Replies