PHP Classes

Paypal invalid_scope

Recommend this page to a friend!

      PHP OAuth Library  >  PHP OAuth Library package blog  >  How to Implement a PH...  >  All threads  >  Paypal invalid_scope  >  (Un) Subscribe thread alerts  
Subject:Paypal invalid_scope
Summary:Error with Paypal
Messages:8
Author:Jorge Vargas
Date:2016-01-14 15:32:40
 

  1. Paypal invalid_scope   Reply   Report abuse  
Picture of Jorge Vargas Jorge Vargas - 2016-01-14 15:32:40
I'm using your script on my module in Prestashop. When I created a new API for Paypal we get an error invalid_scope.

Have you some information related with this answer?

  2. Re: Paypal invalid_scope   Reply   Report abuse  
Picture of Jorge Vargas Jorge Vargas - 2016-01-14 15:33:54 - In reply to message 1 from Jorge Vargas
This is debug output:

OAuth client: Checking if OAuth access token was already retrieved from https://api.paypal.com/v1/oauth2/token
OAuth client: A valid access token is not available

OAuth client: Checking the authentication state in URI /modulos/sociallogin/login?p=paypal&state=1452785006-0e8be3&error_uri=https%3A%2F%2Fwww.domain.co%2Fmodulos%2Fsociallogin%2Flogin%3Fp%3Dpaypal&error_description=Client+Validation+Error%3A+Invalid+scope.&error=invalid_scope
OAuth client: Checking the authentication code

OAuth client: Authorization failed with error code invalid_scope

OAuth client: Resetting the access token status for OAuth server located at https://api.paypal.com/v1/oauth2/token

  3. Re: Paypal invalid_scope   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2016-01-14 21:36:48 - In reply to message 1 from Jorge Vargas
This usually means that you have not allowed to access the permissions to access user profile data. You can change that in Paypal Apps page, in the "Log In with PayPal" option there is a link to "Advanced options" where you can add the necessary permissions.

  4. Re: Paypal invalid_scope   Reply   Report abuse  
Picture of Jorge Vargas Jorge Vargas - 2016-01-15 14:03:46 - In reply to message 3 from Manuel Lemos
Look that:

s11.postimg.org/ywi4xlw5v/Screen_Sh ...

This is API configuration and it is on Live mode.

  5. Re: Paypal invalid_scope   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2016-01-15 17:31:43 - In reply to message 4 from Jorge Vargas
Also enable the address information and account information.

  6. Re: Paypal invalid_scope   Reply   Report abuse  
Picture of Jorge Vargas Jorge Vargas - 2016-01-25 23:14:50 - In reply to message 5 from Manuel Lemos
Yes. It solved scope error. Now I pass by auth window and when I get back answer:

it was not possible to access the OAuth access token: it was returned an unexpected response status 401 Response: {\"error\":\"invalid_authz_code\",\"error_description\":\"Authorization Code is invalid\"}

Some known solution?

  7. Re: Paypal invalid_scope   Reply   Report abuse  
Picture of Jorge Vargas Jorge Vargas - 2016-01-25 23:31:02 - In reply to message 5 from Manuel Lemos
I change token url to: /v1/identity/openidconnect/tokenservice now works.

  8. Re: Paypal invalid_scope   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2016-01-26 01:11:34 - In reply to message 7 from Jorge Vargas
Yes the oauth_configuration.json file updated 11 days ago was fixed to correct the token_url. Just use the latest version so you do not have to set the token_url manually.