Anon Keys

Create anon key

Changed on
post/projects/{id}/anon-keys

Request

  • Base URL
    https://api.volcano.dev
  • Auth
    • HTTP bearer
    • or HTTP bearer

Path parameters

id, string uuid required

Project ID

Request body

object required
name, string required

Key name for identification. Can only contain letters, numbers, underscores, and hyphens.

permissions, string[]

Optional list of permissions for this key. If not provided, defaults to auth-only permissions: auth.signup, auth.signin, auth.refresh, auth.logout, auth.password_reset, auth.confirm_email, auth.resend_confirmation. Storage, realtime, and functions permissions must be explicitly added if needed.

Example request

{
  "name": "frontend-app",
  "permissions": [
    "auth.signup",
    "auth.signin",
    "auth.refresh",
    "auth.logout"
  ]
}

Response

Anon key created

AnonKey required
id, string uuid required
project_id, string uuid
name, string required
key_value, string required

JWT token - use this in frontend Authorization header

permissions, string[]

Permissions granted to this anon key. Auth permissions: auth.signup, auth.signin, auth.refresh, auth.logout, auth.password_reset, auth.confirm_email, auth.resend_confirmation Storage permissions: storage.upload, storage.download, storage.list, storage.delete Realtime permissions: realtime.connect, realtime.subscribe, realtime.publish Functions permissions: functions.invoke

is_default, boolean

Whether this is the project's configured default anon key. Only one key per project can be default.

created_at, string date-time

Example response

{
  "permissions": [
    "auth.signup",
    "auth.signin",
    "auth.refresh",
    "auth.logout"
  ]
}

Changes

    • info

      the endpoint scheme security ProjectAccessToken was added to the API

    • breaking

      added the new path request parameter id

    • breaking

      the response's body type changed from no type to object for status

    7 more changes in this revision