0
votes

Getting issue as while calling requests using Sandbox:

  {
    "message": "This endpoint requires at least one of the following scopes: all_trips_lite, request, all_trips",
    "code": "unauthorized"
}

I followed below steps to resolve: This endpoint requires at least one of the following scopes: all_trips_lite, request, all_trips

I'm Using Auth URL as:

https://login.uber.com/oauth/v2/authorize?client_id=<client_id>&redirect_uri=https%3A%2F%2Flocalhost%2Fuber%2Ftoken&response_type=code&scope=delivery%20history%20history_lite%20places%20profile%20ride_widgets%20request%20request_receipt&state=UX9cbePmD4rjqbPWu2TmL6j2dDFaNnWHlXi1SSgh88s%3D&_csid=UIWy-eu_TgrabNHTffLvVQ

Getting response as invalid scope like below :

https://localhost/uber/token?error=invalid_scope&state=UX9cbePmD4rjqbPWu2TmL6j2dDFaNnWHlXi1SSgh88s%3D#_

I have one more doubt I invited developer in dashboard accepted the invitation but still show pending from two days. if once registered what are the next steps how to login as developer to test sandbox APIS booking and cancel

1

1 Answers

0
votes

When you build your "authorize" URL - please dont use spaces when you add scopes to the scope list. Use + instead. So decoded URL should look like:

https://login.uber.com/oauth/v2/authorize?client_id=your_client_id&redirect_uri=https://localhost/uber/token&response_type=code&scope=delivery+history+history_lite+places+profile+ride_widgets+request+request_receipt&state=UX9cbePmD4rjqbPWu2TmL6j2dDFaNnWHlXi1SSgh88s=&_csid=UIWy-eu_TgrabNHTffLvVQ

Try to pass this into an incognito mode of the browser - and when it prompts you to log in - use your Uber account registered at your developer dashboard: https://developer.uber.com/dashboard/. After you get your authorization "code" - use Token Exchange Endpoint to get your access token.

Related to a developer that you invited on your app dashboard - it needs to be a valid Uber account - so register for an Uber rider account with that email address - by providing the valid telephone number (you will need it for OTP that is required to be able to login to your account). Then you can use this account in authentication process - by login as I explained above.