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

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


Your postman request looks correct to me. My best guesses at whats going on:

1) You have multiple redirects set up, and you're using one redirect url when you do the authorization phase and a different one when you try and do token exchange

2) You're doing authorization for one client_id, and trying to do token exchange for another

3) You're authorization code has already been used / expired. Keep in mind its only good for one request.

Could you try the following and tell me what happens:

1) Do the authorization flow and pay special attention that the client id and redirect uri you put in your authorization URL are correct

2) After your browser redirects, copy the authorization code out of the redirect URL

3) Put the authorization code into the postman request / curl statement and make sure that the client id / redirect URI is correct when you do it.


Status Code: 401 Unauthorized

{  "error": "invalid_grant"}
  1. You are using an invalid refresh_token. You can generate multiple access tokens, but you can only use the latest generated refresh_token.

  2. You supplied an invalid code when exchanging an authorization code for an access_token.