-7

Please help me

https://your-redirect-uri/?code=AUTHORIZATION_CODE

How do I get the authorization code?

Zoe
  • 27,060
  • 21
  • 118
  • 148
sk sakil
  • 186
  • 1
  • 12

1 Answers1

0

First you should double check if you set the correct redirect url in the dashboard - needs to be the same as one on authorization url. Please follow the steps of the authentication guide.

Briefly, you need to:

• Send user to authorize url. It starts by redirecting the user to the authorize endpoint: https://login.uber.com/oauth/v2/authorize?client_id=YOUR_CLIENT_ID&response_type=code&redirect_uri=YOUR_REDIRECT_URI .You can add scopes as well (check 'scope' parameter on authentication guide)

• Receive the redirect with an authorization code. After the user approves the scopes the user will be redirected to the redirect_uri with an auth code that you can post to the /v2/token endpoint to receive an access token.

• Make a POST call to: 'https://login.uber.com/oauth/v2/token' • Store access and refresh token for future use

Sasa Jovanovic
  • 857
  • 5
  • 8
  • You don't need to store auth code - when you get it after authorization is completed - you need to exchange it for access_token by making POST to the /v2/token endpoint. So curl for your case will look like: curl -F 'clientsecret=EU7rVNp9Jg7eJHQqxqYqgMfcRWUIw8PHNvub5AOk'\ -F 'client_id=YOUR_CLIENT_ID' \ -F 'grant_type=authorization_code' \ -F 'redirect_uri=YOUR_REDIRECT_URL/'; \ -F 'code=YOUR_AUTH_CODE' \ login.uber.com/oauth/v2/token – Sasa Jovanovic Aug 07 '17 at 22:58
  • plzz send ur code..I need your hlp..in android i implement this – sk sakil Aug 08 '17 at 06:16
  • For more info how to get access_token on Android please check following [documentation](https://developer.uber.com/docs/riders/ride-requests/tutorials/api/android#native-login-with-uber-sso) – Sasa Jovanovic Aug 09 '17 at 22:59