Reputation: 455
Trying to connect powerapps to 3rd party REST service, this service requires an authentication token. I can do this easy enough with requests and python, but someone wants to do it in powerapps.
I need to pass this token from powerapps to the REST service something like this:
headers = {"content-type": "application/json", "Authorization": "Xy454uu99blahblah"}
result_get = requests.get(url, headers=headers)
anyway to do this? I don't know a whole lot about powerapps?
headers = {"content-type": "application/json", "Authorization": "Xy454uu99blahblah"}
result_get = requests.get(url, headers=headers)
Upvotes: 1
Views: 1690
Reputation: 4365
Here's how I've done this type of token auth in the past using a Custom Connector and Flow:
finalDataCall
) with PowerApps as triggerOnSelect
property in PowerApps (assuming user pushes a button) use:ClearCollect(
colFinalDataCall,
finalDataCall.Run(
queryParam1.Text,
queryParam2.Text,
queryParam3.Text,
queryParam4.Text)
)
This will collect the response from the Flow call into PowerApps so you can manipulate the data.
Not for the faint of heart, but its been operating soundly for me for over a year now.
Here is the original forum post with pictures.
Upvotes: 0
Reputation: 87228
In addition to using Flow as suggested by @ChrisMoncayo, you can also use a custom connector that can be called directly from PowerApps. The linked resource has more information about creating a custom connector for your API (or feel free to post new questions if you have problems when creating one).
Upvotes: 0
Reputation: 36
You can't call 3rd party rest directly from PowerApps. You will need to use a Flow to return the data.
Here is a similar answered question Rest API calls with PowerApps
Hope this helps.
Upvotes: 2