# API02004: User Not Authorized

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

You're logged in, but your user account doesn't have permission to perform the requested action. This is an authorisation issue (what you can do) rather than an authentication issue (who you are).

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

* **User role limitations** — Your WordPress role doesn't include POS access
* **POS access disabled** — Your account wasn't granted POS permissions
* **Feature restrictions** — Certain features are limited to specific roles
* **Store restrictions** — You may not have access to this particular store

## 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_cannot_view`             | WordPress REST API   |
| `woocommerce_rest_cannot_view` | WooCommerce REST API |

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

### 1. Check User Role[​](#1-check-user-role "Direct link to 1. Check User Role")

In WordPress Admin → Users:

1. Find your user account
2. Verify the role (e.g., Shop Manager, Administrator)
3. Ensure the role includes WooCommerce capabilities

### 2. Enable POS Access[​](#2-enable-pos-access "Direct link to 2. Enable POS Access")

In WordPress Admin → WooCommerce → POS → Access:

1. Find the user or role
2. Enable POS access permissions
3. Save changes

### 3. Request Additional Permissions[​](#3-request-additional-permissions "Direct link to 3. Request Additional Permissions")

Contact your store administrator to:

* Grant your role POS access
* Assign you a role with appropriate permissions
* Enable specific features you need

### 4. Check Store Assignment[​](#4-check-store-assignment "Direct link to 4. Check Store Assignment")

If using multiple stores:

* Verify you're assigned to the correct store
* Check store-specific permissions

## Required Permissions[​](#required-permissions "Direct link to Required Permissions")

Different actions require different capabilities:

* **View products**: Read access to products
* **Create orders**: Create/edit order capabilities
* **Manage customers**: Customer management capabilities
* **Access reports**: View reports capabilities

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

* [API02005](/error-codes/API02005.md) — Insufficient Permissions
* [API02001](/error-codes/API02001.md) — Invalid Credentials
