a sandbox request from paypal rest api platform app returns Not Authorized response message
ismailalabou
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Jul-17-2021
08:57 PM
i made a test transaction using my test accounts (personal/business partner), and i added the tracking info to that same transaction in order retrieve that tracking info using the rest API;
but i got this response instead when i made my call (get method):
(400 bad request)
P.S: i included my credentials (username/password) using basic auth in the api call:
plus my headers are also in place:
thanks.
Labels:
Login to Me Too
- Labels:
-
Payments REST APIs
3 REPLIES 3
ismailalabou
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul-18-2021
08:05 PM
ismailalabou
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul-19-2021
06:54 AM
here is the response after noticing that my uploaded screenshots are no longer showing in my posted message:
{
"errors": [
{
"name": "NOT_AUTHORIZED",
"message": "Not Authorized",
"debug_id": "46bb5cb07f7a9",
"details": [
{
"field": "#/transaction_id",
"value": "51M282532U8742612",
"location": "body",
"issue": "USER_NOT_AUTHORIZED"
}
]
}
]
}
plus here is my get call:
https://api-m.sandbox.paypal.com/v1/shipping/trackers/51M282532U8742612-XYZ123456
PS: partner sandbox account and API credentials are correct.
here is my cURL code:
curl --location --request GET 'https://api-m.sandbox.paypal.com/v1/shipping/trackers/51M282532U8742612-XYZ123456' \
--header 'Content-Type: application/json' \
--header 'Bearer: ...' \
--header 'Authorization: Basic ...'
ismailalabou
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul-19-2021
07:11 AM

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
- Sandbox isnt working in REST APIs
- PayPal integration with Next, Lambda and API Gateway - 400 Invalid Request in Sandbox Environment
- I am not receiving the six-digit code required for login via sandbox in REST APIs
- How do I change the Google Pay Merchant ID associated with my account? in SDKs
- Authorization failed due to insufficient permissions in REST APIs