02-14-2023 09:35 AM
Hi all,
I'm approaching the use of the Ebay API for the first time.
I need to ask you some questions:
1. What is the duration of the Token? Currently when I create a new Token (sandbox or production), its duration is only one hour. Will this always be the case or is there a way to create a permanent or longer lasting Token?
2. I can't work with the Sandbox. It looks like I can only test API calls but I can't create, edit or close an AD. Is that it? or am I doing something wrong?
Thank you in advance.
Regards,
Renato
02-14-2023 09:53 AM - edited 02-14-2023 09:53 AM
Hi @guardiano78
We support two methods for authorizing the calls you make to the eBay APIs:
OAuth—All eBay RESTful APIs use the OAuth 2.0 protocol for application and user authorization. OAuth is the industry standard for assuring your online transactions are secure.
OAuth user access token remains valid for 7,200 seconds (2 hours) from the time it was generated. After the token expires, you will need to renew it using the supplied refresh token. You can also use OAuth tokens with eBay Traditional APIs.
Ref: https://developer.ebay.com/api-docs/static/oauth-authorization-code-grant.html
Auth’n’Auth—The authentication and authorization technology used by eBay Traditional APIs. Auth`n`Auth token is valid for 18 months across multiple sessions of the application.
Ref: https://developer.ebay.com/api-docs/static/understand_auth_n_auth_tokens.html
02-14-2023 10:16 AM
hello,
thank you so much for reply.
Since I'm starting now for the first time, also in the future, which type do you recommend me to use?
Regards,
Renato
02-14-2023 12:18 PM
The future trend is to use OAuth, so you might start with that.
02-14-2023 01:18 PM
Hello @shipscript
thank you very much, I'll follow your suggestion 😀
Speaking of Sandbox, does anyone know if it works well? Is it possible to add, edit and terminate ADS via API?
or is it just for generic API testing?
03-01-2023 12:20 AM - edited 03-01-2023 12:21 AM
The duration of a token depends on the specific API or service that you're using. However, in general, tokens have a limited duration for security purposes. This means that they will expire after a certain period of time, typically anywhere from a few minutes to a few hours, depending on the service.
03-01-2023 07:22 AM - edited 03-01-2023 07:27 AM
Hello,
why when I create a token, it only lasts one hour?
What am I doing wrong?
Please see image, I created it at 16.11 and it expires at 17.11 today:
https://imagogroup.it/ebay-api-token.png
Regards