Reply
tbuck8384
New Member
Partially syndicated - Outbound

How do I connect to Web API data with Power BI Desktop?

I am trying to connect Power BI Desktop to a website API and was given the following information on the backend of our web portal to configure API and authentication. See screenshot below. How do I even get started with this?? If I go to Power BI/Power Query and choose "New Source > Web" I tried both the Token URL and Redirect URL, but am unable to authenticate in. The Request URL for the GET Request is something like "https://CompanyName.open.data.com/api/api/intake/v1/requests" and I am also using this URL in the access sign in but am unable to authenticate in with "Anonymous" and if I try and select "Web API" it's asking for a "KEY" which I am not sure I have judging by the information below...Thoughts?

 

How do I connect to this website using API connection info below in Power BI allowing me to get the data and build the dashboards needed?

 

Below is a view of the API connection information that was given to me....

 

Capture.JPG

 

Also, I am open to any and all suggestions for "Best Practice" solutions here. If this is something better designed in a Dataflow or Datamart let me know. I have a "Premium" Account in the Power BI Platform. Let me know what the best solution would be to design this connection to pull in data. Thanks!

6 REPLIES 6
BIBB
Helper I
Helper I

Syndicated - Outbound

What other options apart from "ClientCredentials" do you have? If you only have an legged oauth authentication, you will need to build a custom connector, which is more complex. 

If you have a "basic" option, you should be able to build the query in the Power Query editor and the function that you require Web.Contents. We have written a very complete article, including sample code, about it. 

https://www.bibb.pro/post/web-contents-and-apis-in-powerbi

Web.Contents in Power BIWeb.Contents in Power BI





Syndicated - Outbound

That article does not cover token authentication.

Syndicated - Outbound

I believe your comment is a bit misleading as the article contains several code samples implementing token authentication. 

Syndicated - Outbound

Hmm, can't seem to find that word in the article.

 

lbendlin_0-1735042642173.png

 

Brunner_BI
Super User
Super User

Syndicated - Outbound

It seems like that you need to get a token first and then get the data with this token.

Meaning first you need to do a GET request in Power Query to receive the token as a result.

Then you use this result to send a POST request (is not that straight forward, you need to specify a body of the request only then Power Query will send it as POST - otherwise it always defaults to GET which you dont want) to get the data.

------------------------------------
Brunner BI focusing on Microsoft Power BI development and consulting
Developers of external tool "Measure Killer"
My blog
lbendlin
Super User
Super User

Syndicated - Outbound

Please read the documentation. It is really good.  Web.Contents - PowerQuery M | Microsoft Learn

avatar user

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)