Getting an access token from an API using Curl/insomnia

Associate
Joined
10 Jan 2006
Posts
483
I need to get an access token for the uber API as I am using it as a login method. However the documentation says use curl - (I am using insomnia because i prefer it)

Here are the fields it requires with curl

curl -F 'client_secret=YOUR_CLIENT_SECRET' \
-F 'client_id=YOUR_CLIENT_ID' \
-F 'grant_type=authorization_code' \
-F 'redirect_uri=YOUR_REDIRECT_URI' \
-F 'code=AUTHORIZATION_CODE' \
https://login.uber.com/oauth/v2/token

Now to get a response from Uber - Do I need to make a post request to :
https://login.uber.com/oauth/v2/token

and then put all the other details in the headers?
 
Im using Insomnia which is basically the same as postman but I can't seem to get a token back from API which is very frustrating.

I have the code back from the API but then I need to exchange that code for a token using those fields and I have double checked all of them to make sure they are right and made sure I got a new code once the other one had expired.
 
Back
Top Bottom