Authorization failed due to insufficient permissions. Invalid Scopes

SandepSoni
Contributor
Contributor

Hi,

I am getting authentication error when trying to an authorization request on Paypal sandbox environment.

Error message: "Authorization failed due to insufficient permissions"

Sandbox ID - gmk5dfkmv4hfvtfx
{
"name": "BUSINESS_ERROR",
"debug_id": "475026eb1dc84",
"message": "Business error",
"information_link": "https://developer.paypal.com/webapps/developer/docs/api/#BUSINESS_ERROR",
"details": [
{
"name": "UNAUTHORISED ACCESS",
"message": "Authorization failed due to insufficient permissions. Invalid Scopes"
}
]
}

Login to Me Too
76 REPLIES 76

MTS_Jennifer
Moderator
Moderator

Hi @DevFM1 ,

Thank you for contributing to this post. We can update sandbox scopes manually. If you receive this error in sandbox, then we will need either the sandbox debug id or the sandbox merchant id.

If this is for a live account, the account first needs to be enabled for Reference Transactions. Then the scopes can be added to the live account.  For a live account, you will need to submit a ticket to the PayPal Merchant Technical Support to get the scopes added.

Here is how to submit a ticket:

  • Go to https://paypal.com/mts
  • Click on Contact us at the bottom right
  • Click Log in with PayPal (Log into your live account)
  • Click Contact Us
  • Choose PayPal as the Product
  • Subject "Please add future payment's scopes to Rest API app"
  • Include in the description your live client id, and that you need Future Payment's Scopes enabled on your live Rest API app.
  • Fill in the rest of the ticket and click Submit

Thank you,
Jennifer

MTS

PayPal

 

Login to Me Too

James533
Contributor
Contributor

Hello @MTS_Jennifer 

I am also struggling with this issue I would like all the scopes for future payments to be activated for all my live and sandbox Rest Api apps.

debug_id: "7045fe10adb68"

Here is the error:

 
Paypal.js:40 Creating Product...
Paypal.js:61 Failed to create product:
  1. {name: 'NOT_AUTHORIZED', message: 'Authorization failed due to insufficient permissions.', debug_id: '7045fe10adb68', details: Array(1), links: Array(1)}
    1. debug_id: "7045fe10adb68"
    2. details: [{…}]
    3. links: [{…}]
    4. message: "Authorization failed due to insufficient permissions."
    5. name: "NOT_AUTHORIZED"
    6. [[Prototype]]: Object
Login to Me Too

MTS_Chiranjeevi
Moderator
Moderator

Hi @James533,

 

Good day!

I have activated your Sandbox Client ID and added the required scopes. Please perform a new API call via sandbox test environment.

Sincerely,

Chiranjeevi

PayPal/Braintree MTS

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

Login to Me Too

James533
Contributor
Contributor

Hi @MTS_Chiranjeevi 

Thank you for taking a look at my case, unfortunately when trying to create a product(which according to the documentation i need to do before trying to create a subscription) I am still getting an 403 error;

Failed to create product: name: 'NOT_AUTHORIZED', message: 'Authorization failed due to insufficient permissions.', debug_id: 'aed9ff3b7c395'

 

These are the scopes of the access token I have logged: Scope: https://api.paypal.com/v1/payments/.* https://uri.paypal.com/services/vault/payment-tokens/read openid Braintree:Vault https://uri.paypal.com/services/subscriptions

 

Could you please take a look? Is the issue because the right permissions didn't get added to my account?

my sandbox client id:

Ae1FF9KqFUHxVdVRMYkBqQ_Zrv81p6RwXzkPvL8fvdkU-Y_L_TJTDDfKz0J69zC_X2-9ZbH1GKCtjXH-
 
Best Regards
 
James
Login to Me Too

MTS_Chiranjeevi
Moderator
Moderator

@James533 

I have added scopes to Client-ID linked to your Sandbox REST App name : LevelsSandbox.

Please perform API calls from that Client_ID.

If your still facing the issue, please create a MTS ticket via - https://www.paypal-support.com/s/?language=en_US with detailed error information. 

Login to Me Too

Bennybee29
Contributor
Contributor
Hello @MTS_Chiranjeevi can I have mine done as well please ? Thanks
Login to Me Too

MTS_Chiranjeevi
Moderator
Moderator

Hi @Bennybee29,

 

Good day!

Please provide your Sandbox Client ID, Sandbox Email Address and the error details with debug ID.

 

Sincerely,

Chiranjeevi

PayPal/Braintree MTS

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

Login to Me Too

Bennybee29
Contributor
Contributor
Sandbox id : AU_ku0YTTAxKAHVT2Hj5YJgOx6TyH3jgzzP9hYr89VZyt4wRmQgmFLoKtp7V8wkirgQ3DEKTEg_5igVG Error : Somebody has just tried to make a payment using PayPal, we got the following error from PayPal API error: Authorization failed due to insufficient permissions. Authorization failed due to insufficient permissions.
Login to Me Too

Bennybee29
Contributor
Contributor
500 internal server error is what I can see! Thanks
Login to Me Too

Bennybee29
Contributor
Contributor
Hi @MTS_Jennifer has mine been rectified yet please ?
Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.