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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Destined
New Member

API(web) as Refreshable data source

Need help from the local Gurus. 
I have the following connection in PowerBI desktop version to get data from an API source. With an anonymous authentication. 

= Json.Document(Web.Contents("https://mysource/statistics/tenant/monthly", [Headers=[#"X-API-Key"="Mykey21123123"]]))

 

However, when I published this to PowerBi web, I can no longer refresh the data. When configuring test connection, i receive the 400 error. "Failed to update data source credentials: The credentials provided for the Web source are invalid." 

Is there a way to fix it? (I've been going through the forum for the whole day, and couldn't resolve this). 


1 REPLY 1
Anonymous
Not applicable

Hi  @Destined ,

 

This is the related document, you can view this content:

Solved: Failed to update data source credentials: Web.Cont... - Microsoft Power BI Community

Solved: DataSource.Error: Web.Contents failed to get conte... - Power Platform Community (microsoft....

https://stackoverflow.com/questions/75545609/powerbi-service-reading-from-rest-api-through-data-gate...

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.