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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
Employee
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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors