Skip to main content

forbidden

The requested operation is not allowed for this entity in Unkey. Check your root key permissions or workspace access level and try again.
2 min read
Danger
err:unkey:authorization:forbidden
Example

What Happened?#

This error occurs when you attempt an operation that is prohibited by Unkey's platform policies, even if your API key has high-level permissions. Unlike the "insufficient_permissions" error which relates to permission roles, this error indicates that the operation itself is not allowed regardless of permissions.

Common scenarios that trigger this error:

  • Trying to perform operations on protected or system resources
  • Attempting to modify resources that are in a state that doesn't allow modifications
  • Trying to exceed account limits or quotas
  • Performing operations that violate platform policies

Here's an example of a request that might trigger this error:

How To Fix#

This error indicates a fundamental restriction rather than a permission issue. The operation you're trying to perform may be:

  1. Not supported by the Unkey platform: Some operations are simply not available
  2. Blocked due to your account's current state or limitations: Your account may not have access to certain features
  3. Prevented by safety mechanisms: System protections may prevent certain destructive operations

Possible solutions include:

  • Check Unkey's documentation: Understand which operations have fundamental restrictions
  • Consider your account state: Some operations may be blocked due to your account state or plan
  • Use alternative approaches: Find supported ways to accomplish similar goals
  • If you're trying to modify a resource in a specific state: check if it needs to be in a different state first
  • If you're hitting account limits: consider upgrading your plan
  • Contact Unkey support if you believe this restriction shouldn't apply to your use case

Common Mistakes#

  • Attempting to modify system resources: Some Unkey resources are protected and cannot be modified
  • Order-dependent operations: Trying to perform operations out of their required sequence
  • Plan limitations: Attempting operations not available on your current plan
  • Resource state issues: Trying to modify resources that are in a state that doesn't allow changes
  • Ignoring documentation warnings: Not reading warnings about restricted operations
  • Testing security boundaries: Deliberately trying to access protected resources
  • Outdated documentation: Following outdated documentation that suggests now-forbidden operations