Skip to content

Update Embed Token

ali-hamud edited this page Apr 20, 2017 · 5 revisions

setAccessToken

setAccessToken can be used to update underlying Embed token without reloading the embedded report. This method can be helpful in different cases:

  1. After SaveAs After SaveAs, the new report will be shown, while the underlying token is giving access to the old report. In such case, you should generate a new token to see the new report, and use setAccessToken to set new generated token.

  2. Token is expired or near expiry If you want to change a token which is expired or near expiry, you need to use setAccessToken.

Usage Example

report.setAccessToken("eyJ0eXAiOiJKV1Qi..00YU")
  .catch(error => { ... });

getAccessToken

getAccessToken returns the current embed token.

Usage Example

var token = report.getAccessToken();