Skip to main content
Published: February 04 2011, 6:10:00 PMUpdated: November 28 2020, 9:11:08 PM

I have a token for which I failed to save the expiration time. How do I find if its valid?

The simplest way would be to make a call such as GeteBayOfficialTime. If the call succeeds, it means that the token is valid. If you want to find additional information such as the expiration time, you can use the GetTokenStatus call.

Below are sample responses that indicate the various statuses that could be returned by the call.

<?xml version="1.0" encoding="utf-8"?>
<GetTokenStatusResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <Timestamp>2011-01-31T22:55:18.773Z</Timestamp>
  <Ack>Success</Ack>
  <Version>705</Version>
  <Build>E705_CORE_BUNDLED_12630438_R1</Build>
  <TokenStatus>
    <Status>Active</Status>
    <EIASToken>nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6wJnY+oC5iFog6dj6x9nY+seQ==</EIASToken>
    <ExpirationTime>2012-07-24T22:54:53.000Z</ExpirationTime>
  </TokenStatus>
</GetTokenStatusResponse>

Tokens need to be renewed every 18 months, else they expire

<?xml version="1.0" encoding="utf-8"?>
<GetTokenStatusResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <Timestamp>2011-01-31T22:51:48.113Z</Timestamp>
  <Ack>Success</Ack>
  <Version>705</Version>
  <Build>E705_CORE_BUNDLED_12630438_R1</Build>
  <TokenStatus>
    <Status>Expired</Status>
    <EIASToken>nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6wMl4CiDZiKoA+dj6x9nY+seQ==</EIASToken>
    <ExpirationTime>2010-07-15T18:50:00.000Z</ExpirationTime>
  </TokenStatus>
</GetTokenStatusResponse>


<?xml version="1.0" encoding="utf-8"?>
<GetTokenStatusResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <Timestamp>2011-01-31T22:56:46.561Z</Timestamp>
  <Ack>Success</Ack>
  <Version>705</Version>
  <Build>E705_CORE_BUNDLED_12630438_R1</Build>
  <TokenStatus>
    <Status>RevokedByUser</Status>
    <EIASToken>nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6wJnY+oC5iFog6dj6x9nY+seQ==</EIASToken>
    <ExpirationTime>2012-07-24T22:54:53.000Z</ExpirationTime>
    <RevocationTime>2011-01-31T22:56:33.000Z</RevocationTime>
  </TokenStatus>
</GetTokenStatusResponse>

<?xml version="1.0" encoding="utf-8"?>
<GetTokenStatusResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <Timestamp>2011-01-31T22:59:18.073Z</Timestamp>
  <Ack>Success</Ack>
  <Version>705</Version>
  <Build>E705_CORE_BUNDLED_12630438_R1</Build>
  <TokenStatus>
    <Status>RevokedByApp</Status>
    <EIASToken>nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6wJnY+oC5iFog6dj6x9nY+seQ==</EIASToken>
    <ExpirationTime>2012-07-24T22:57:25.000Z</ExpirationTime>
    <RevocationTime>2011-01-31T22:59:01.000Z</RevocationTime>
  </TokenStatus>
</GetTokenStatusResponse>

 

How well did this answer your question?
Answers others found helpful