cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sandbox oauth login not working via curl or python

 

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'

 

Message 1 of 2
latest reply
1 REPLY 1

Sandbox oauth login not working via curl or python

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

Message 2 of 2
latest reply