External APIs with Oath 2.0
Options
![Danilo Toledo](https://us.v-cdn.net/6037124/user_avatars/1646760.jpg)
Danilo Toledo
Member ✭
Is it possible to make a request to an external API that needs Oauth 2.0?
I have this example request in curl:
curl -F "client_secret=$CLIENT_SECRET"
-F "client_id=$CLIENT_ID"
-F "grant_type=client_credentials"
-F "scope=your.store"
https://login.domain.com/oauth/v2/token
But I didn't find a way to send this parameters (client_secret, client_id, grant_type and scope) in the request external api interface.
Any ideas here?
I have this example request in curl:
curl -F "client_secret=$CLIENT_SECRET"
-F "client_id=$CLIENT_ID"
-F "grant_type=client_credentials"
-F "scope=your.store"
https://login.domain.com/oauth/v2/token
But I didn't find a way to send this parameters (client_secret, client_id, grant_type and scope) in the request external api interface.
Any ideas here?
Comments
-
did you tried to import this curl in a function stack item "External API Request" ?
and change the fixed data with concatenation and variables sets?
(and you can store your "keys" at "instance settings", under Environment Variables, you have Your Variables ) -
For some reason import curl isn't working with that specific example.
Let me see what is going wrong. We are doing a release later this evening so I'll make sure a fix for this is included. I'll respond back once fixed. -
Hi Danilo - you would just use the params section to set the parameters. You can use the SET filter to set each parameter path and it's value. You can make the value dynamic with inputs or variables
[Screenshot_2021-08-09_19-08-58.png] -
thank you! It worked.
-
the import curl fix is also deployed
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback