Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello
I am trying to call data from an API. My access token is only available for an hour and my current call limits are restricting me to a certain amount of call per second. I am running a Function to call data and the amount of data takes more than an hour to pull. How can I set up the refresh token within power bi desktop? I can get the data ok, but I don't want to be adding new access token when it expires.
When requesting a token from the API
Thanks
Joe
Hi @Anonymous
A common practice is creating a query to get access token from an API and converting it into a custom function. Then in other queries, invoke this custom function to get the token instead of entering a fixed access token.
Here is an old similar thread for your reference. You would need to modify the code according to your API.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 64 | |
| 45 | |
| 41 | |
| 36 | |
| 23 |
| User | Count |
|---|---|
| 192 | |
| 125 | |
| 106 | |
| 78 | |
| 53 |