Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
I have a report with a Rest API source from a website, which refreshes fine in Power BI Desktop, but gives an error in the service.
The result is json.
This is my code:
The error given in the service is "The downloaded data is HTML, which isn't the expected type. The URL may be wrong or you might not have provided the right credentials to the server. "
I have set up my credentials on the server as Anonymous.
I have tried with both the skip test connection on and off, both don't work.
What do I need to change?
Hi @Anonymous
If the API is returning HTML then it could be a 401, 403 or 404 error message. Or perhaps a firewall is blocking the request.
The username and password are definitely correct?
Has the Token expired?
You could try using Postman to issue the requests and see what is being returned.
Regards
Phil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.
Proud to be a Super User!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.