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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.