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
amerianou
Frequent Visitor

Access website API with token

Hello guys,

 

I have an API  endpoint from a website and I was also sent an API access token.

I can't find the right way to make the connection with my Power BI Desktop.

 

How should I procceed?

 

Thanks in advance,

Anna

3 REPLIES 3
Anonymous
Not applicable

Hi @amerianou,

Did these suggestions help with your scenario? if that is the case, you can consider Kudo or accept the helpful suggestions to help others who faced similar requirements to find it more quickly.

If these also don't help, please share more detailed information to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

hi @amerianou,

You can use a web connector with the rest API URL and correspond tokens to get data.

Sample:

let
    rooturl = "https://xxxxx.xxxx.com/",
    token = "xxxxxxx",
    relativeURL = "xxxxx/xxxxx",
    Result =
        Web.Contents(
            rooturl,
            [
                Headers = [
                    #"Content-Type" = "application/json",
                    Authorization = "Bearer " + token,
                    RelativePath = "/api/xxxx/xxxxx"
                ],
                RelativePath = relativeURL
            ]
        )
in
    Result

Chris Webb's BI Blog: Using The RelativePath And Query Options With Web.Contents() In Power Query An...

Regards,

Xiaoxin Sheng

amitchandak
Super User
Super User

@amerianou , refer if this can help

https://community.powerbi.com/t5/Power-Query/Pull-data-from-a-REST-API-Authentication/td-p/246006

https://docs.microsoft.com/en-us/power-query/handlingauthentication

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.