Reputation: 75
I'm trying to get the user's permission for three scopes (subscription_payment
, account_enhanced_profile
and account_available_balance
), and I'm trying this, to get them:
https://test.api.neteller.com/v1/oauth2/authorize?client_id=################&redirect_uri=https://paymentstest/gateways/neteller/confirmpayment.php&scope=subscription_payment+account_enhanced_profile+account_available_balance&response_type=code
In the API, they have this documented, in the scopes section:
The supplied scope parameter will indicate the level of access you require for your app. The scope parameter MUST be supplied. If you application requires multiple scopes then you should supply a space separated list of the required permissions. Eg.
scope=perm1+perm2
but I still get this error, when I perform the request:
{
["error"] => "invalid_scope"
["error_description"] => "The requested scope is invalid, unknown, or malformed."
}
Why could I be getting this error? I am using php, and urlencode()
to add the scopes to the link. This is a redirect to call the 'client' for their permissions.
Upvotes: 0
Views: 300
Reputation: 209
There is an error in the documentation. The correct way to pass multiple scopes is to list them separated by a comma, like so:
https://test.api.neteller.com/v1/oauth2/authorize?client_id=################&redirect_uri=https://paymentstest/gateways/neteller/confirmpayment.php&scope=subscription_payment,account_enhanced_profile,account_available_balance&response_type=code
Upvotes: 2