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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.