5

It is mentioned in oauth documentation at https://developer.uber.com/v1/auth/ that access token remains valid for 30 days. But I have started getting invalid credential error within a week. The exact error I am getting is:-

{"message":"Invalid OAuth 2.0 credentials provided.","code":"unauthorized"}

Trying refresh token after this error gives invalid grant error whereas 'refresh_token' is valid grant type.

{"error": "invalid_grant"}

Anyone facing similar issues?

ninja
  • 183
  • 1
  • 12
  • yes. I Got Access token expired in one day. Are you still facing this problem? – Qadir Hussain May 21 '15 at 13:02
  • I now get the same `{"message":"Invalid OAuth 2.0 credentials provided.","code":"unauthorized"}` even though I keep refreshing my access token. – bolizhou Aug 10 '15 at 02:48

1 Answers1

3

If your client credentials are used to get another access token, that will invalidate former access tokens associated with that user.

When an access token expires, you must obtain a new access token. Use the refresh token to get a new access token without prompting a user to login and grant permission again. The refresh token itself is not a valid token to access API endpoints - it is just a code you keep to exchange for a new access token when yours expires. This is described in Step Five: Refreshing Tokens in Uber's Authentication Guide.

Christine Kim
  • 231
  • 1
  • 4