err:unkey:authorization:key_disabled
The authentication key is disabled
What Happened?
This error occurs when you try to use a disabled Unkey API key (one that starts with unkey_
) to authenticate with the Unkey API. The key exists in the system but has been disabled and can no longer be used for authentication.
Here’s an example of a request that would trigger this error:
API keys can be disabled for various reasons:
- Administrative action to revoke access
- Security concerns or suspected compromise
- Temporary deactivation during maintenance or investigation
- Automated disabling due to suspicious activity
- Usage policy violations
How To Fix
If you encounter this error when using the Unkey API, you have two options:
-
Get a new Unkey root key: If your key was permanently disabled, create a new API key with the appropriate permissions in the Unkey dashboard
-
Re-enable your existing key: If you have administrative access and the key was temporarily disabled, you can re-enable it through the dashboard
To re-enable your Unkey root key:
- Log in to your Unkey dashboard
- Navigate to the API keys section
- Search for the key you want to re-enable
- Click “Enable”
Then update your API calls to use the re-enabled key:
Common Mistakes
- Using old or archived root keys: Keys from previous projects or configurations may have been disabled
- Shared root keys: When keys are shared among team members, they may be disabled by another administrator
- Security triggers: Unusual usage patterns may automatically disable keys as a security precaution
- Environment confusion: Using disabled staging/development keys in production environments
- Account status changes: Keys may be disabled due to billing or account status changes
- Rotation policies: Keys that should have been rotated according to security policies
Related Errors
- err:unkey:authorization:insufficient_permissions - When the authenticated entity lacks sufficient permissions
- err:unkey:authorization:workspace_disabled - When the associated workspace is disabled
- err:unkey:authentication:key_not_found - When the provided API key doesn’t exist at all