post - Uber API | Requesting Access Token for Ride request returns 'invalid_grant' error -


i want users request uber rides app.
https://developer.uber.com/docs/rides/authentication

under oauth 2.0 section @ above url, there 6 steps :
1. authorize (done)
2. receive redirect (done)
3. access token ('invalid_grant' error)

the following screenshot postman. tried passing client_id, client_secret, grant_type, redirect_uri , code params, form-data , x-www-form-url-encoded. everytime returns same error.

enter image description here

i have put 'http://localhost:3000/auth/uber/callback' redirect url in uber app dashboard.

i have tried following curl command in terminal,but returns same 'invalid_grant' error

enter image description here

can me issue.

your postman request looks correct me. best guesses @ whats going on:

1) have multiple redirects set up, , you're using 1 redirect url when authorization phase , different 1 when try , token exchange

2) you're doing authorization 1 client_id, , trying token exchange another

3) you're authorization code has been used / expired. keep in mind 1 request.

could try following , tell me happens:

1) authorization flow , pay special attention client id , redirect uri put in authorization url correct

2) after browser redirects, copy authorization code out of redirect url

3) put authorization code postman request / curl statement , make sure client id / redirect uri correct when it.


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -