Search code examples
javaebay-api

How to get eBay token expiry date using existing eBay token


I have an auth_token of eBay, I want to get the expiration date of this token.

I know its duplicate question, but no answer was provided for that question: https://stackoverflow.com/questions/23474204/how-to-bring-ebay-token-expiry-date-using-existing-ebay-token


Solution

  • Make a call to GetTokenStatus. As long as you have passed the token in the RequesterCredentials.eBayAuthToken field of the request the date and time that it will expire can be obtained by reading the ExpirationTime field in the response.

    Another way of getting the same information is via the HardExpirationWarning field that is returned in some of the API operations. For example AddItem. This information is returned within the 7-day period prior to a token's expiration.