Invalid Client Failure requesting Token

slayr
New Community Member

Hello!

I am testing a method to auto-generate invoices. I have the following settings in my Web API request

POST: https://api-m.sandbox.paypal.com/v2/oauth2/token
Parameters: grant_type:client_credentials

Authorization: Username: sb-*****_api1.business.example.com

                        Password: <System generated password>

Headers: Accept: application/json

               Accept-Language: en_US

 

I continue to get the following error

{"error":"invalid_client","error_description":"Client Authentication failed"}

 

I am using the Sandbox credentials provided by Paypal. Confused on what I'm doing wrong. Any help is appreciated!

Login to Me Too
1 REPLY 1

MTS_Justin
Moderator
Moderator
Hello,

You're attempting to use the email address and password for a sandbox account for an API-based solution, which requires API credentials to work correctly. In this specific case, you will need the "client_id" and "client_secret" from a sandbox REST application to request an access token.

Create a sandbox REST app & retrieve credentials : https://developer.paypal.com/docs/api/overview/#get-credentials

(note : There is an active issue where accessing the REST apps & credentials page returns a HTTP 500 error. We're working on this issue, check the thread pinned at the top of this forum to see when the issue is resolved)

Once you have the REST credentials, you can submit an access token request :

https://developer.paypal.com/docs/api/overview/#get-an-access-token

Thanks !


Was my post helpful? If so, please give me a kudos!
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.