Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Help API Connection

Hi guys,

I need some help to solve a problem I can't find the solution.

 

I want to connect PowerQuery to a API that the token change automatically all the time. I tried to make a parameter to capture the token and built the complete URL of the API using that parameter but it doesn't work well. I can connect the API for a couple of minutes but crash later.

 

Anyone know how to solve it??

 

The URL to get the token is this one: 

 

 

The API is this (the value of the token continue after the equal sign, of course):

 

Thanks a lot !!!

 

1 ACCEPTED SOLUTION

If you create a blank query with Web.Contents (or use the Web connector) and use your Token URL, so you get a token in response?  If so, right click on the "cell" containing the token and choose "Drill Down" to get to just the text value.  Name that query something relevant and then use that name as part of a concatenated string in your second web call. 


Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

3 REPLIES 3
mahoneypat
Microsoft Employee
Microsoft Employee

Instead of a parameter, you can make a query to retrieve your token and "drill down" so the output is a text value (instead of a table).  You can then use the result of that query in your second query.

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

Hi Mahoneypat,

Thanks a lot for your answer, I really appreciate it.

 

I don't know how can I do that 😞

 

If you create a blank query with Web.Contents (or use the Web connector) and use your Token URL, so you get a token in response?  If so, right click on the "cell" containing the token and choose "Drill Down" to get to just the text value.  Name that query something relevant and then use that name as part of a concatenated string in your second web call. 


Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.