Forum Discussion
Rest API Oauth2 as a data source
MSchultz93 , refer if this can help
Rest source - Token based
https://www.advaiya.com/generate-dynamic-token-and-get-data-from-custom-api-in-power-bi/
- MSchultz933 years ago
Helper I
Hi, thank you for the reply!
I actually built my code from that link, however, on that website an access token is queried from a static URL with a username and password. The function never needs to change. My logic is more complicated.
I have a query that is using a refresh token to obtain an access token and a refresh token. The new refresh token must be used the next time I generate an access token. Therefore the query that creates the access token must use the last created refresh token and therefore the query is not static like the one in the link.
Do you have any advice on that? If you need any clarification let me know