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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi,
This is going to be so simple to somebody but I don't know where to start and I've tried searching the forum but getting myself even more confused.
I have to connect to a system that publishes a dynamic API key every 24 hours. I can do these two steps manually but just can't combine them.
let
GetAPIKey = Json.Document(Web.Contents("http://SomeSystemPath/Auth?UserName=MyUserName&Password=MyPassword")),
'The above returns the API Key but how do I pass it to the following bits
Source = Json.Document(Web.Contents("https:////SomeSystemPath/Levels?WarehouseId=3&APIKey=GetAPIkey")),
in Source
Any helpwould be greatly appreciated...
Thanks
Tom
Solved! Go to Solution.
Please try this instead.
let
GetAPIKey = Json.Document(Web.Contents("http://SomeSystemPath/Auth?UserName=MyUserName&Password=MyPassword")),
Source = Json.Document(Web.Contents("https:////SomeSystemPath/Levels?WarehouseId=3&APIKey=" & GetAPIkey))
in Source
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Please try this instead.
let
GetAPIKey = Json.Document(Web.Contents("http://SomeSystemPath/Auth?UserName=MyUserName&Password=MyPassword")),
Source = Json.Document(Web.Contents("https:////SomeSystemPath/Levels?WarehouseId=3&APIKey=" & GetAPIkey))
in Source
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 11 | |
| 10 | |
| 6 | |
| 6 | |
| 6 |