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

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.

Reply
Anonymous
Not applicable

Simple API JSON "GET" call with a TOKEN (I already have a token)

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

2 REPLIES 2
Anonymous
Not applicable

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
    json

Replace "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.           

Anonymous
Not applicable

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.

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors