Error attempting to retrieve oath token

Seanno82
Contributor
Contributor

First time setup. Trying to test by running the following, but it returns: "error":"invalid_client","error_description":"Client Authentication failed"

 

curl -v POST https://api.sandbox.paypal.com/v1/oauth2/token \
-H "Accept: application/json" \
-H "Accept-Language: en_US" \
-u "Authorization:Basic:<ClientID>:<Secret>" \
-d "grant_type=client_credentials"

 

Any insights would be greatly appreciated.

Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

MTS_Stefan
Moderator
Moderator
Hello Sean,

The error means, that you are sending either the client ID or secret wrong.
Often that is caused by sending live credentials against the sandbox and vs as well as copy and paste issues.
When you are in the developer.paypal.com > my REST Apps, please look up on the sandbox side and do not copy spaces.
Regards,
Stefan

View solution in original post

Login to Me Too
2 REPLIES 2

Seanno82
Contributor
Contributor

Meant "OAuth"

Login to Me Too
Solved

MTS_Stefan
Moderator
Moderator
Hello Sean,

The error means, that you are sending either the client ID or secret wrong.
Often that is caused by sending live credentials against the sandbox and vs as well as copy and paste issues.
When you are in the developer.paypal.com > my REST Apps, please look up on the sandbox side and do not copy spaces.
Regards,
Stefan
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.