Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
 
					
				
		
I have not used PBI to perfom API calls in a while and things have certainly changed. I have looked around the internet and have found loads of suggestions but most don't understand the difference between a Token and a Key. Postman works fine.
With that, could I please acquire the updated and supported, simple and exact, Power Query syntax to pull API json data with a TOKEN, NOT a KEY. This seems simple enough but the syntax and requirements have changed and I am time constrained.
Thanks for your help!
TS
 
					
				
		
Hi @Anonymous ,
Please try
let
    token = "your_token_here",
    url = "https://api.example.com/data",
    options = [
        Headers = [
            #"Authorization" = "Bearer " & token
        ]
    ],
    response = Web.Contents(url, options),
    json = Json.Document(response)
in
    jsonReplace "your_token_here" with your actual token and "https://api.example.com/data" with the URL of the API endpoint you want to call. This code will send a GET request to the API endpoint with the token in the Authorization header and return the JSON response.
Please note that you may need to modify the options variable to include additional headers or query parameters depending on the API you are calling.
Similar post: Solved: How to pull data from Web API into PowerBI using A... - Microsoft Power BI Community
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks so much for your response, Stephen.
What you shared should work but does not. I am not using any other Headers. Again, Postman works perfectly. I have two other API calls running to the same system but they don't require Tokens. I don't see any error messages and the only thing returned is the actual text in the API call.
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
