Reference > Errors
authentication_required
# authentication_required import { VARS } from '@data/vars'; The `authentication_required` error occurs when the API request lacks valid authentication credentials. :::note This is classified as a **platform error** (task state → ERROR) rather than a user error, because it typically indicates a configuration issue with the API key rather than a problem with the task itself. ::: --- ## Details * **HTTP Status:** `401 Unauthorized` * **Retryable:** No * **Task State:** ERROR --- ## When does this occur? This error is returned when: * The `Authorization` header is missing from the request * The API key has been revoked or has expired * The API key is malformed or invalid --- ## Example response ```json { "type": "/reference/api-and-sdk/troubleshooting/errors/authentication-required/", "title": "Your API key is invalid or has expired. Please generate a new key and try again.", "status": 401, "instance": "/api/v1/agent/tasks", "error": "Your API key is invalid or has expired. Please generate a new key and try again.", "retryable": false } ``` --- ## How to resolve 1. Generate a new API key from the <a href={VARS.WEB_APP_URL}>{VARS.WEB_APP}</a> or via the {VARS.WARP_AGENT_CLI}. 2. Update your client configuration with the new key. 3. Retry the request. --- ## Related * [{VARS.API_SDK_NAME}](/reference/api-and-sdk/) — API authentication * [{VARS.WARP_AUTOMATION_PLATFORM}](/platform/overview/) — API key managementHelp me use this reference: https://docs.warp.dev/reference/api-and-sdk/troubleshooting/errors/authentication-required/The API key in the request is invalid, expired, or missing. Generate a new key and update your client configuration.
The authentication_required error occurs when the API request lacks valid authentication credentials.
Details
Section titled “Details”- HTTP Status:
401 Unauthorized - Retryable: No
- Task State: ERROR
When does this occur?
Section titled “When does this occur?”This error is returned when:
- The
Authorizationheader is missing from the request - The API key has been revoked or has expired
- The API key is malformed or invalid
Example response
Section titled “Example response”{ "type": "/reference/api-and-sdk/troubleshooting/errors/authentication-required/", "title": "Your API key is invalid or has expired. Please generate a new key and try again.", "status": 401, "instance": "/api/v1/agent/tasks", "error": "Your API key is invalid or has expired. Please generate a new key and try again.", "retryable": false}How to resolve
Section titled “How to resolve”- Generate a new API key from the Oz web app or via the Oz CLI.
- Update your client configuration with the new key.
- Retry the request.
Related
Section titled “Related”- Oz API & SDK — API authentication
- Oz — API key management