Forum Discussion
How to bring data from a Rest API into Powebi including authentication Token
Hi there,
I am wondering if someone can help me connect PowerBI to the following REST API.
Directions on how to connect to the API are in the following link: https://dev.praemium.com/
However, I am not sure exactly how to enter the details into PowerBI.
Many thanks
3 Replies
- rajulshahResident Rockstar
Hello jprice0401,
Please try following:
let Source = Web.Contents("http://{URL as provided}/Portfolios HTTP/1.1", [Headers=[#"content-type"="application/json",#"x-pps-token"="YOUR-TOKEN-GOES-HERE",#"x-pps-api-version"="THE-API-VERSION"]]), JsonProductResponse = Json.Document(Source ,1252) in JsonProductResponseHope this helps.
- jprice0401New Member
Hi there thank you for your help.
I am still unsure where the body of the call would go in this solution i.e. the Portfolio ID and Username as in the link provided.
Thanks
- v-juanli-msftCommunity Support
Hi jprice0401
rajulshah's solution should work,
Please enter the query in the Advanced editor of Edit quesris(Power Query).
Besides, there are some references:
https://docs.microsoft.com/en-us/power-query/handlingauthentication
If there is still any problem, feel free to let us 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.