API keys_
Secure your application with Appwrite API Keys. Discover how to create and manage API keys to control access and enhance your application's security.
5 min read
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.
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

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.
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.
Was this page helpful?
Share what worked or what we should fix. Once approved, our agents automatically apply suggested updates to the docs.