I am trying to retrieve some information (table data) from an external API that requeries some kind of authentication based on an "token" and "bearer" that si requeried to be passed in the header request like
Hi @jon00320 ,
Could you please share a bit more about your scenario?
Do you want to retrieve data using an external API within PowerApps app?
Based on the needs that you mentioned, I think Custom connector could achieve your needs. On your side, you could consider create a custom connector based on your external API, then within the Security tab, select API Key as authentication way, and specify the Parameter name to "Authorization", Parameter location to "Header":
After that, define proper action under Definition tab based on the action path from your external API. Then save your custom connector, within the "Test" tab, create a connection to the custom connector, it would show up a dialog asking you to provide API Key value (Access Token value), there you should type the following format Access Token value:
then test the operation defined in your custom connector under the "Test" tab, check if it could retrieve proper records from your API.
After that, you could use the Custom connector within your canvas app to retrieve values from your external API.
More details about creating a custom connector in PowerApps, please check the following article:
thanks for the response
After creating a custom connector and defining an action for request get, it retuns, when testing this connector, a 0400 type error.
Hi @jon00320 ,
Could you please share more details about the error message within your custom connector?
Is your external API a RESTful API?
Based on the 404 error that you mentioned, it means that there is something wrong with your client. Please check if you have specifyed proper action within your custom connector.
Also please check if you have provided proper access token when you creared a connection to the custom connector. On your side, you could consider test your external API using Postman tool, then check if the action patch that you specified in your custom connector is proper.
Yes, I can confirm that it is a RESTFull API
On the other hand, I wil try to do some testing withe GETPOSTMAN so I can give you some more information, maybe the action has not been defined properly. Not sure of this point.
I have test the API from POSTMAN and it works, anyway, I have used "Bearer token" as Authorization type that is nos present in the custom connector por power platform.
This is params section for POSTMAN connection:
Check out new user group experience and if you are a leader please create your group
Did you know that you can visit the Power Query Forum in Power BI and now Power Apps
Participate in the Power Virtual Agents Community Challenge
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.