Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
@ALean,
Please check the following similar blog about how to connect to web API with bearer token.
https://chris.koester.io/index.php/2015/07/16/get-data-from-twitter-api-with-power-query/
Regards,
Lydia
Thanks for the link v-yuezhe-msft.
That didn't work though.
The code on that blog is just a more complicated version of what I'm doing.
Since my bearer token is static, I don't need to request it dynamically everytime.
That blog outlines it as fundamentally being "table = Web.Contents(apiUrl , options)"
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
102 | |
48 | |
19 | |
13 | |
11 |