Forum Discussion
Having problems to find the Power BI AccessToken
Hello everyone,
I am trying to generate the Acess Token for my report.
I am trying to do so by following this tutorial: https://msdn.microsoft.com/library/mt784614.aspx
So in the tutorial, it says to make a post request to this link: https://api.powerbi.com/v1.0/myorg/groups/{group_Id}/reports/{report_id}/GenerateToken
I understand what group_id and report id is, but in the Header I am supose to give the Power BI access token.
Header Content-Type: application/json; charset=utf-8 Authorization: Bearer eyJ0eX ... FWSXfwtQ The Authorization header is the Power BI AccessToken.
Where can I find this Power BI AccessToken?
Thank you very much,
Henrique.
You are getting your tokens confused. All the API's require a Power BI Access Token. The GenerateToken API referenced above is a token used only to open a Report. Here is information on how to generate a Power BI Access Token:
https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-embedding-content/
Also you might want to use the new version of the API Version 2.
https://github.com/Microsoft/PowerBI-CSharp
1 Reply
- jamesyoungFrequent Visitor
You are getting your tokens confused. All the API's require a Power BI Access Token. The GenerateToken API referenced above is a token used only to open a Report. Here is information on how to generate a Power BI Access Token:
https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-embedding-content/
Also you might want to use the new version of the API Version 2.
https://github.com/Microsoft/PowerBI-CSharp