Invalid Client Failure requesting Token
slayr
New Community Member
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Jun-08-2021
06:41 AM
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!
1 REPLY 1

Moderator
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun-08-2021
08:00 AM
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!
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!

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- PayPal integration with Next, Lambda and API Gateway - 400 Invalid Request in Sandbox Environment
- When I do PayPal capture Order, I keep on getting Invalid Request Connection in REST APIs
- I Have PayPal API Billing Authentication Failure Python-Flask in REST APIs
- PayPal Website Payments Pro in PayPal Payments Standard
- GetInvoiceDetails stopped working in NVP/SOAP APIs