Find the answer to your question
Advanced Search
Question
I have a token for which I failed to save the expiration time. How do I find if its valid?
Answer
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>2022-08-17T11:24:48.879Z</Timestamp>
<Ack>Success</Ack>
<Version>1123</Version>
<Build>E705_CORE_BUNDLED_12630438_R1</Build>
<TokenStatus>
<Status>Active</Status>
<EIASToken>nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6wJnY+oC5iFog6dj6x9nY+seQ==</EIASToken>
<ExpirationTime>2022-12-17T11:24:48.879Z</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>2022-08-17T11:24:48.879Z</Timestamp>
<Ack>Success</Ack>
<Version>1207</Version>
<Build>E1207_CORE_APISIGNIN_19151597_R1</Build>
<TokenStatus>
<Status>Expired</Status>
<EIASToken>nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6wMl4CiDZiKoA+dj6x9nY+seQ==</EIASToken>
<ExpirationTime>2022-08-16T11:24:48.879Z</ExpirationTime>
</TokenStatus>
</GetTokenStatusResponse>
<?xml version="1.0" encoding="utf-8"?>
<GetTokenStatusResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2022-08-17T11:24:48.879Z</Timestamp>
<Ack>Success</Ack>
<Version>1207</Version>
<Build>E1207_CORE_APISIGNIN_19151597_R1</Build>
<TokenStatus>
<Status>RevokedByUser</Status>
<EIASToken>nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6wJnY+oC5iFog6dj6x9nY+seQ==</EIASToken>
<ExpirationTime>2022-10-17T11:24:48.879Z</ExpirationTime>
<RevocationTime>2022-08-16T10:24:48.879Z</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>1207</Version>
<Build>E1207_CORE_APISIGNIN_19151597_R1</Build>
<TokenStatus>
<Status>RevokedByApp</Status>
<EIASToken>nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6wJnY+oC5iFog6dj6x9nY+seQ==</EIASToken>
<ExpirationTime>2022-10-17T11:24:48.879Z</ExpirationTime>
<RevocationTime>2022-08-16T10:24:48.879Z</RevocationTime>
</TokenStatus>
</GetTokenStatusResponse>