Skip to content

Project

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.

6 min read

Raw

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.

Create API key

Project settings screen
Project settings screen

To create a new API key, open API Keys in the project sidebar 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.

List API keys

Get an API key

Create an ephemeral key

Ephemeral keys are short-lived API keys that expire after a set duration, useful for temporary or single-session server access without managing a long-lived key. Pass the scopes to grant and a duration in seconds (maximum 3600). The response includes the generated secret and its expiration time.

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.