# API02010: Auth Required

## What This Means[​](#what-this-means "Direct link to What This Means")

The action you're trying to perform requires authentication, but you're not currently logged in. The POS needs valid credentials to access this resource.

## Common Causes[​](#common-causes "Direct link to Common Causes")

* **Not logged in** — You haven't authenticated yet
* **Session cleared** — Your session was cleared or expired
* **Accessing protected resource** — The resource requires authentication
* **App data cleared** — Stored credentials were removed

## Server Error Mapping[​](#server-error-mapping "Direct link to Server Error Mapping")

This error code is triggered when the server returns:

| Server Code               | Source                         |
| ------------------------- | ------------------------------ |
| `rest_login_required`     | WordPress REST API             |
| `jwt_auth_no_auth_header` | JWT Authentication plugin      |
| HTTP 401                  | Any server response (fallback) |

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

### 1. Log In[​](#1-log-in "Direct link to 1. Log In")

If you haven't logged in:

1. Open the POS login screen
2. Enter your WordPress credentials
3. Complete the authentication process

### 2. Check Session Status[​](#2-check-session-status "Direct link to 2. Check Session Status")

If you thought you were logged in:

* Your session may have expired
* Look for [API02002](/error-codes/API02002.md) (Token Expired) for more details
* Log in again to restore access

### 3. Verify Server Configuration[​](#3-verify-server-configuration "Direct link to 3. Verify Server Configuration")

Ensure the API endpoints are properly configured:

* WooCommerce REST API should be enabled
* WCPOS plugin should be active
* Authentication endpoints should be accessible

### 4. Check for Browser/App Issues[​](#4-check-for-browserapp-issues "Direct link to 4. Check for Browser/App Issues")

If you're being logged out unexpectedly:

* Clear browser cache (if using web version)
* Check that cookies/local storage aren't being blocked
* Verify the app has permission to store data

## What Requires Authentication?[​](#what-requires-authentication "Direct link to What Requires Authentication?")

Most POS operations require authentication:

* Viewing products and customers
* Creating and editing orders
* Processing payments
* Accessing reports

Only the initial login screen is accessible without authentication.

## Related Errors[​](#related-errors "Direct link to Related Errors")

* [API02001](/error-codes/API02001.md) — Invalid Credentials
* [API02002](/error-codes/API02002.md) — Token Expired
