Search code examples
spring-bootpaypalpayment-gatewaypaypal-sandboxpaypal-rest-sdk

When calling paypal rest api it says invalid scope


enter image description hereCurrently when i call below api it says invalid scope
https://www.sandbox.paypal.com/connect/?scope=openid%20email&response_type=code&redirect_uri={uri}&client_id={clientId}

can someone help me for this issue, as i need to call below APIs. so, how can i get relevant scopes

  • get merchant details : /retail/merchant/v1/status
  • create orders : v2/checkout/orders
  • capture orders : v2/checkout/orders/+orderId+/capture
  • get user info with details : v1/identity/oauth2/userinfo?schema=paypalv1.1

Solution

  • Ordinary usage of the REST API does not involve any of that -- here is the documentation for getting an access token.


    Are you integrating Log in with PayPal, specifically? The URL in your screenshot is specifically for Log in / Connect with PayPal. To request the 'email' scope with such an integration you must enable it within the Sandbox App Settings. Changes may take 9 hours to have an effect.

    enter image description here

    Again, using the REST API has nothing to do with those scope attributes.