03-14-2024 07:45 AM
I tried getting fresh token from my application but failed how can I get a oauth token from my python based application or longer the duration of my oauth tokens?
03-14-2024 10:01 AM
The OAuth access tokens are good for two hours.
If getting an application token (client_credential) for accessing public data, you would need to mint a new token every two hours.
https://developer.ebay.com/api-docs/static/oauth-client-credentials-grant.html
If getting a user token for private data (authorization_code), the authentication process will return both a 2-hour access token and an 18-month refresh token that is linked to the user account. When the 2-hour token expires, use the refresh token to mint another 2-hour token.
https://developer.ebay.com/api-docs/static/oauth-authorization-code-grant.html
There are some Python SDKS here:
https://developer.ebay.com/develop/ebay-sdks