Forum Discussion
Trying to Connect to an API
- 1 year ago
Hi Cesylyaa,
Thank you for reaching out to the Microsoft Fabric Forum Community.
Thank you to the lbendlin,danextian, for your valuable insights. As mentioned, authentication is often the reason for seeing HTML code instead of actual data in the Navigator. By examining the HTML, you may find error messages like 401 Unauthorized or 403 Forbidden, which indicate authentication issues.
Additionally, referring to the API documentation, as recommended, is an excellent way to ensure you are using the correct endpoint and following the proper authentication process.
- Please ensure that you are using the correct API endpoint URL (e.g., /clients, /data) rather than any URLs intended for other purposes like API documentation.
- To authenticate in Power BI, go to Home → Get Data → Web, enter the API URL, and select the appropriate authentication method (API key, OAuth2, or Bearer Token). Provide the necessary credentials or tokens to ensure secure access and retrieve the API data for analysis.
- Before trying to connect in Power BI, test the API using tools such as Postman or curl.
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you.
- 1 year ago
Hi Cesylyaa,
Thank you for your patience! could you confirm if the API returns structured data (such as tables, JSON, or XML) instead of an HTML response?
Here’s how to check:
- Open the API URL in your browser and check its response. If you see JSON or structured data, the API is functioning correctly. If it shows an HTML page, the API may not be returning data in the expected format, possibly due to an incorrect endpoint or missing request parameters.
- Use Postman to send a GET request to the API. If the response contains tables, JSON, or XML, the API returns structured data. If it returns HTML, the issue might be with the endpoint or required headers.
- If the API returns only HTML, it could indicate an incorrect endpoint (such as a documentation URL instead of a data URL) or missing required headers or parameters for a proper response.
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you.
Hello,
I did speak to the backend developer who provided me the code.
He said there is no Username/password, so that implies no Authentication?
Is there still a workaround for this?