Skip to content

API keys

API keys are secrets used by Appwrite Server SDKs and the Appwrite CLI to prove their identity. What can be accessed each API key is restricted by scopes instead of permissions.

Best practice

It is a best practice to grant only the scopes you need to meet your project's goals to an API key. API keys should be treated as a secret. Never share the API key and keep API keys out of client applications.

API keys vs Dev keys

API keys and Dev keys are not the same and cannot be used interchangeably.

API keys permit access to Appwrite services in production environments, with access controlled through scopes to ensure secure and controlled server-side operations. Dev keys, conversely, are specifically designed to help you avoid abuse limits and CORS errors in test and development environments.

API keys are for server SDKs and the CLI in production environments, while Dev keys are for client SDKs in development environments.

Create API key

Project settings screen

Project settings screen

To create a new API key, navigate to Overview > Integration > API keys and click Create API key.

You can then use the API key to initialize the Appwrite client in your server-side apps.

When adding a new API Key, you can choose which scopes to grant your application. If you need to replace your API Key, create a new key, update your app credentials and, once ready, delete your old key.

Manage API keys with a Server SDK

You can also manage API keys programmatically using a Server SDK. This requires an API key with the keys.read and keys.write scopes.

Sensitive scopes

The keys.read and keys.write scopes are very sensitive. An API key with keys.write can create new keys with any scope, effectively granting full access to your project. Only assign these scopes to keys used in trusted, secure environments, and never expose them in client-side applications.

List API keys

Get an API key

Create an API key

Update an API key

Delete an API key

Scopes

When adding a new API key, you choose which scopes to grant. Scopes are grouped by service, matching the categories shown in the Appwrite Console.

  • Auth
    NameDescription
    sessions.write
    Access to create, update, and delete user sessions
    users.read
    Access to read your project's users
    users.write
    Access to create, update, and delete your project's users
    teams.read
    Access to read your project's teams
    teams.write
    Access to create, update, and delete your project's teams
  • Databases
    NameDescription
    databases.read
    Access to read your project's databases
    databases.write
    Access to create, update, and delete your project's databases
    tables.read
    Access to read your project's database tables
    tables.write
    Access to create, update, and delete your project's database tables
    columns.read
    Access to read your project's database table columns
    columns.write
    Access to create, update, and delete your project's database table columns
    indexes.read
    Access to read your project's database table indexes
    indexes.write
    Access to create, update, and delete your project's database table indexes
    rows.read
    Access to read your project's database rows
    rows.write
    Access to create, update, and delete your project's database rows
  • Functions
    NameDescription
    functions.read
    Access to read your project's functions and code deployments
    functions.write
    Access to create, update, and delete your project's functions and code deployments
    execution.read
    Access to read your project's execution logs
    execution.write
    Access to execute your project's functions
  • Storage
    NameDescription
    files.read
    Access to read your project's storage files and preview images
    files.write
    Access to create, update, and delete your project's storage files
    buckets.read
    Access to read your project's storage buckets
    buckets.write
    Access to create, update, and delete your project's storage buckets
  • Messaging
    NameDescription
    providers.read
    Access to read your project's providers
    providers.write
    Access to create, update, and delete your project's providers
    messages.read
    Access to read your project's messages
    messages.write
    Access to create, update, and delete your project's messages
    topics.read
    Access to read your project's topics
    topics.write
    Access to create, update, and delete your project's topics
    subscribers.read
    Access to read your project's subscribers
    subscribers.write
    Access to create, update, and delete your project's subscribers
    targets.read
    Access to read your project's targets
    targets.write
    Access to create, update, and delete your project's targets
  • Sites
    NameDescription
    sites.read
    Access to read your project's sites and deployments
    sites.write
    Access to create, update, and delete your project's sites and deployments
    log.read
    Access to read your site's logs
    log.write
    Access to update and delete your site's logs
  • Other
    NameDescription
    locale.read
    Access to your project's Locale service
    avatars.read
    Access to your project's Avatars service
    health.read
    Access to read your project's health status
    migrations.read
    Access to read your project's migrations
    migrations.write
    Access to create, update, and delete your project's migrations
    tokens.read
    Access to read your project's tokens
    tokens.write
    Access to create, update, and delete your project's tokens
    webhooks.read
    Access to read your project's webhooks
    webhooks.write
    Access to create, update, and delete your project's webhooks
    keys.read
    Access to read your project's API keys
    keys.write
    Access to create, update, and delete your project's API keys
    rules.read
    Access to read your project's proxy rules
    rules.write
    Access to create, update, and delete your project's proxy rules
    vcs.read
    Access to read your project's VCS repositories
    vcs.write
    Access to create, update, and delete your project's VCS repositories
    assistant.read
    Access to read the Assistant service