skip to Main Content

I’ve created a new sandbox app in paypal and checked all controls under settings.

I’m manually making a request to get an access token using cURL as suggested in the docs.

Then I make a POST request to /v2/customer/partner-referrals. I’m simply copy-pasting the request from the docs from here.

The response I get is:

HTTP/1.1 403 Forbidden
... 
{
    "name":"NOT_AUTHORIZED",
    "message":"Authorization failed due to insufficient permissions.",
    "debug_id":"...",
    "information_link":"",
    "details":[{
        "issue":"MISSING_SCOPES",
        "description":"User doesn't have this API in their scope"
    }],
    "links":[]
}

The partner onboarding page says, that I get 401 Unauthorized if the account doesn’t have permissions to access the commerce API. But at the same time I can’t find a way to request certain APIs to be included in the scope.

How can I authorize a request to PayPal Commerce API ?

UPD

There’s an additional question which may actually be a reason for my issue. Am I required to apply and be approved for the Parter Program before I can use sandbox APIs ?
There’s a flow chart on the paypal website for PayPal Commerce Platform integration. It clearly shows that develop the app while using sandbox while I wait for the app approval. How show I interpret this image then?

The fastest way to get started is to start the Engineering and
Business workflows at the same time.

enter image description here

2

Answers


  1. Are you an approved PayPal partner? The form to request so is linked from the onboarding page in your question…

    Login or Signup to reply.
  2. When testing this on sandbox you need to have these specific scopes added to your account.

    To do this you’ll have to contact PayPal-support using this link:

    [https://www.paypal-support.com/s/contactsupport?language=en_US.%5D%5B1%5D

    Let Support know you would like to add the Sandbox Scopes for PayPal Commerce Platform for Partners to your sandbox account and they should be able to help you out!

    I hope this can help you!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search