Forum Discussion

ronnoc's avatar
ronnoc
Icon for Advocate II rankAdvocate II
9 years ago
Solved

Setting up javascript api - the perpetual mystery of access tokens

Cheers to everyone in the community who has helped with everything so far.

 

I really need some directions on finding the necessary authentication credentials to embed a report within the new javascript API, as mentioned in posts by othersPaulFowler; I have found that the api documentation includes a detailed walk through of everything 'except the definition and set up of authentication credentials which is a pretty crucial part.

 

The sample here works brilliantly (I love that there is print options) and the code is straight forward. I know these are the variables I need: and this is my current situation on tracking them down.

 

Access token: virtually no idea where to find this, absolutely no clue

Type: "report"

ID: Comes from the workspace ID in Azure I think? eg "c52af8ab-0468-4165-92af-dc39858d66ad" 

Name: I assume is just the name of the embedded report 

WebURL & embedURL: I am hoping come from the same place in PBI service (File>Publish to web)

 

 

There may be something obvious that I am missing but I have now spent far too much time scratching my beard with no results.

 

Any responses will be highly appreciated.

 

Javascript API Wiki

 

Microsoft documentation