Sandbox oauth login not working via curl or python
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 10:36 AM
This is my curl request, i've confirmed the auth token is b64 encoded string `USER:PASS`
curl -v -X POST 'https://api.sandbox.ebay.com/identity/v1/oauth2/token' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Authorization: Basic REDACTED' \
-d 'grant_type=client_credentials&scope=https://api.ebay.com/oauth/api_scope'
Sandbox oauth login not working via curl or python
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2025 05:52 AM
Hello @tiny-industries ,
It appears that the Authorization header is using a Base64-encoded value of Username:Password, which isn't the correct format for the Client Credential Flow.
To generate an Application Token using the Client Credential Flow, the Authorization header should include the word "Basic" followed by your Base64-encoded OAuth credentials, specifically <client_id>:<client_secret>.
Here's how you can adjust your curl request:
curl -v -X POST 'https://api.sandbox.ebay.com/identity/v1/oauth2/token' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Authorization: Basic [Base64-encoded <client_id>:<client_secret>]' \
-d 'grant_type=client_credentials&scope=https://api.ebay.com/oauth/api_scope'
For further guidance, please consult the following documentation:
OAuth Client Credentials Grant
Generating Base64-encoded Credentials
Best Regards,
eBay Developer Support
