Forum Discussion
Embeded report in iframe using the API with embedded token
Hi Nephilim ,
Is your problem solved, if so, mark the correct answer as a marker, if not, provide more detailed information and we can help you better!
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Nephilim2 years agoNew Member
Hi Liu Yang,
I still haven't gotten it to work, but I have a few aditional question though. Using your scrUrl for the iframe, you mention "your bearer token generated". I put the response from the GenerateToken endpoint below to illustrate. It's the long string in the token-key that I have to put in the config param of the url right?
Second question, what is the difference between the url you provided and the one I get back from the reports endpoint (with a much shorter config paran in the url) eg:
"embedUrl": "https://app.powerbi.com/reportEmbed?reportId=8655xxx-xxxx-xxxx-xxxx-xxxx89f1f344&groupId=xxxxe9e1-xxxx-xxxx-xxxx-xxxx84c645e0&w=2&config=eyJjbHVz ... ldHJpY3NWTmV4dCI6dxxxxxx",GenerateToken endpoint response:
{"@odata.context": "http://wabi-us-east2-redirect.analysis.windows.net/v1.0/myorg/groups/0386xxxx-xxxx-xxxx-xxxx-xxxx84c645e0/$metadata#Microsoft.PowerBI.ServiceContracts.Api.V1.GenerateTokenResponse","token": "H4sIAAAAAAAEAC2Ux66ZgQmga7we ... pmQxLCJhbGxvd0FbnRlcm5ldCI6dHJ1ZX0=","tokenId": "fb74xxxx-xxxx-xxxx-xxxx-xxxxf4d53b49","expiration": "2024-04-17T09:49:01Z"}