Reputation: 21
I know that the OAuth 2.0 specs allows to specify multiple scopes while requesting or issuing a token, but Uber doesn't like the multiple scopes.
For example:
1) [No error]
parameters = {
'response_type': 'code',
'redirect_uri': 'INSERT_ROUTE_TO_STEP_TWO',
'scope': 'profile',
}
Returns correct token and I can retrieve the user profile via 'https://api.uber.com/v1/me'
2) [Error]
parameters = {
'response_type': 'code',
'redirect_uri': 'INSERT_ROUTE_TO_STEP_TWO',
'scope': 'profile%20history',
}
Uber returns "Invalid Request Parameters". I tried 'scope': 'profile%20history' and 'scope': 'profile history'. Both cases returns the same error.
I'm an Android developer using https://github.com/twotoasters/AndrOAuth as a test.
Thanks
Upvotes: 2
Views: 1023
Reputation: 3032
Scope uses space delimiters.
You should pass scope as 'scope': 'profile history'
and let the underlying http library handle the URI conversion rather than doing it explicitly by yourself.
Upvotes: 2
Reputation: 394
I'm sure you figured this out by now, but you are using a space to delimit your scope arguments and the api calls for a comma.
Upvotes: 0