# API02002: Token Expired

## What This Means[​](#what-this-means "Direct link to 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 "Direct link to 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 "Direct link to 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 "Direct link to How to Fix")

### 1. Log In Again[​](#1-log-in-again "Direct link to 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 "Direct link to 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](/error-codes/API02007.md) if refresh is failing

### 3. Check Server Time[​](#3-check-server-time "Direct link to 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 "Direct link to 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 "Direct link to Related Errors")

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