# API access token expiration

**URL:** https://forum.shopware.com/t/api-access-token-expiration/62802
**Category:** Shopware Playground - API first Sandbox
**Created:** [5. November 2019 um 09:26 UTC](https://forum.shopware.com/t/api-access-token-expiration/62802 "2019-11-05T09:26:27Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![CallMeAlex](https://avatars.discourse-cdn.com/v4/letter/c/e9a140/32.png) [@CallMeAlex](https://forum.shopware.com/u/CallMeAlex)
#### Post date: [8. Januar 2020 um 11:38 UTC](https://forum.shopware.com/t/api-access-token-expiration/62802/2 "2020-01-08T11:38:39Z")

</div>

Just save the timestamp when the token is running out. Before every request just check if the expiresdate \< current\_date, if yes just logging again and save the new token.

---

_[View the full topic](https://forum.shopware.com/t/api-access-token-expiration/62802)._
