Created Update Embed Token (markdown)

ali-hamud 2017-04-20 13:58:14 +03:00
Родитель b1ed6bd61c
Коммит e6a9c1dda6
1 изменённых файлов: 25 добавлений и 0 удалений

25
Update-Embed-Token.md Normal file

@ -0,0 +1,25 @@
## 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
```javascript
report.setAccessToken("eyJ0eXAiOiJKV1Qi..00YU")
.catch(error => { ... });
```
## getAccessToken
getAccessToken returns the current embed token.
### Usage Example
```javascript
var token = report.getAccessToken();
```