- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to get access token of PayPal Sandbox environment using Postman.
URL: https://api-m.sandbox.paypal.com/v1/oauth2/token
POST
Auth: Basic Auth (with Sandbox user credentials)
Body: x-www-form-urlencoded and added key, value = grant_type, client_credentials
After clicking send I am getting 401 Unauthorized response although I can login to https://www.sandbox.paypal.com using same credentials that I used in Basic auth.
Solved! Go to Solution.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thank you for posting to the PayPal Sandbox Community.
The issue may be credentials you are using. This is what I use when I'm testing in Sandbox on Postman:
Post to Endpoint: https://api.sandbox.paypal.com/v1/oauth2/token
Authorization is Basic Auth
You can obtain your Client ID and Client Secret from logging into the developer dashboard at https://developer.paypal.com
Here are the specific instructions for creating a Rest APP and obtaining your Sandbox Client ID and Client Secret:
https://developer.paypal.com/docs/api/overview/#get-credentials
User name is your Sandbox Client ID
Password is your Sandbox Client Secret
Body:
x-www-form-urlencoded
Key: grant_type Value: client_credentials
Thank you,
Jennifer
PayPal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thank you for posting to the PayPal Sandbox Community.
The issue may be credentials you are using. This is what I use when I'm testing in Sandbox on Postman:
Post to Endpoint: https://api.sandbox.paypal.com/v1/oauth2/token
Authorization is Basic Auth
You can obtain your Client ID and Client Secret from logging into the developer dashboard at https://developer.paypal.com
Here are the specific instructions for creating a Rest APP and obtaining your Sandbox Client ID and Client Secret:
https://developer.paypal.com/docs/api/overview/#get-credentials
User name is your Sandbox Client ID
Password is your Sandbox Client Secret
Body:
x-www-form-urlencoded
Key: grant_type Value: client_credentials
Thank you,
Jennifer
PayPal

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Unable to Create Subscription Using REST Account in Sandbox Environment
- Unable to fetch PLANS Using REST Account in Sandbox Environment
- Generating Wrong Data for Invoices using REST sandbox account in Sandbox Environment
- Generating Wrong Data for Balances using REST sandbox account in Sandbox Environment
- Getting "Invalid Transaction Type" Error When Calling Payflow Gateway API in Payflow