# API02002: Token Expired

## What This Means[​](#what-this-means "Directe link naar What This Means")

Your authentication session has expired. For security reasons, login sessions don't last forever. The POS needs to refresh your authentication or you may need to log in again.

## Common Causes[​](#common-causes "Directe link naar Common Causes")

* **Long inactivity** — You haven't used the POS for an extended period
* **Server token lifetime** — The server's token expiration is set very short
* **Server time mismatch** — Server and device clocks are out of sync

## Server Error Mapping[​](#server-error-mapping "Directe link naar Server Error Mapping")

This error code is triggered when the server returns:

| Server Code              | Source                    |
| ------------------------ | ------------------------- |
| `jwt_auth_expired_token` | JWT Authentication plugin |

## How to Fix[​](#how-to-fix "Directe link naar How to Fix")

### 1. Log In Again[​](#1-log-in-again "Directe link naar 1. Log In Again")

The simplest solution is to log out and log back in:

1. Log out of the POS
2. Enter your credentials again
3. This creates a fresh session

### 2. Check Token Refresh[​](#2-check-token-refresh "Directe link naar 2. Check Token Refresh")

The POS should automatically refresh tokens. If it's not working:

* Check your internet connection
* Verify the server is accessible
* See [API02007](/nl/error-codes/API02007.md) if refresh is failing

### 3. Check Server Time[​](#3-check-server-time "Directe link naar 3. Check Server Time")

Token expiration depends on accurate time:

* Ensure your server's clock is correct
* Check that your device's time is accurate
* Use automatic time sync on both

### 4. Review Token Settings[​](#4-review-token-settings "Directe link naar 4. Review Token Settings")

If tokens expire too quickly, you may need to adjust server settings (consult your hosting provider or WordPress administrator).

## Related Errors[​](#related-errors "Directe link naar Related Errors")

* [API02007](/nl/error-codes/API02007.md) — Token Refresh Failed
* [API02009](/nl/error-codes/API02009.md) — Refresh Token Expired
