Forum Discussion
Right way to get Embedded Token
- Anonymous6 years ago
HI marcio_fornari,
I think these should more relate to your website design, power bi embedded token has its own expiration time. (stored in expiration field) Embed Token - Generate Token#embedtoken
You did not need to invoke generate token API every time you access these contents. BTW, your functions also triggered if web page refreshed or other functions which include multiple threads processing.
I'd like to suggest you create a function to invoke get token api and save token string and expiration date time to session. It should contain if statement to check the session if the token exists or expired to generate a new token or return current token.
Regards,
Xiaoxin Sheng
HI marcio_fornari,
I think these should more relate to your website design, power bi embedded token has its own expiration time. (stored in expiration field) Embed Token - Generate Token#embedtoken
You did not need to invoke generate token API every time you access these contents. BTW, your functions also triggered if web page refreshed or other functions which include multiple threads processing.
I'd like to suggest you create a function to invoke get token api and save token string and expiration date time to session. It should contain if statement to check the session if the token exists or expired to generate a new token or return current token.
Regards,
Xiaoxin Sheng
Hi Anonymous, it's a good ideia save the Token and the Expiration time.
Thank you.