# API02004: User Not Authorized

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

### 1. Check User Role[​](#1-check-user-role "Directe link naar 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 "Directe link naar 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 "Directe link naar 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 "Directe link naar 4. Check Store Assignment")

If using multiple stores:

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

## Required Permissions[​](#required-permissions "Directe link naar 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 "Directe link naar Related Errors")

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