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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Xilice-anonymou
New Member

POWER BI REPORT API REFRESH

Hi everyone,

I am developing a short report about consultants connections, names and department. I request an token from these consult and take that token to request the information in other sites.  In my power Bi desktop works incredible using this M code

let
url = "https://api-xxxx.xxxxx.zone/api10/login",
queryParams = [
username = "username",
password = "password"
],
body = Text.ToBinary(Uri.BuildQueryString(queryParams)),
headers = [#"Content-Type"="application/x-www-form-urlencoded"],
response = Web.Contents(url, [Headers=headers, Content=body]),
jsonResponse = Json.Document(response),
token = jsonResponse[token]
in
token


But when I try to add a new conection "Web" in  "managing connections and Gateways" after publish the  report in  power Bi service

Xiliceanonymou_0-1724447658734.png


I get a 404 error, I already check the credentials, username and password and the privacity level as "none"  like my power bi desktop and they are good.

Greatings.

2 REPLIES 2
Anonymous
Not applicable

Hi @Xilice-anonymou 

 

404 error usually means that the requested URL is incorrect or the resource does not exist. Try the following steps to troubleshoot the problem:

1. Ensure that the URL you’re using in the Power BI Service is correct and accessible from the service. Sometimes, URLs that work locally might not be accessible from the cloud.

2. Make sure your on-premises data gateway is properly configured and running. If your network uses a proxy, ensure that the gateway is configured to use the proxy settings.

3. Change the gateway communication to use HTTPS instead of TCP.

If the problem is still not resolved, please provide an error code or screenshot。

 

Here is similar case for your reference: Solved: On-Premise Data Gateway error for Web Data Source ... - Microsoft Fabric Community

 

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

Xilice-anonymou
New Member

These API only works with a POST request, I tried to make a flow in  power automate, an create an azure function to handle that but I couldn't increase the work license.
I try to set up an API - Empty controller in visual studio but i retrived an error too.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.