Sign in
On this page
Documentationmodcloud CLITokens and scopes

Tokens and scopes

Learn about tokens and permissions required by modcloud CLI operations.

Scopes

API tokens are restricted to the scopes selected when they are created. A command that calls a protected API route requires the matching scope.

ScopeAllows
apps:readList slots, read slot details and settings, inspect deployments, and read slot files.
apps:writeStart, stop, restart, or rebuild a slot; update settings; and write slot files.
deployUpload a project archive for deployment.
logsRead or follow runtime logs.
env:readRead environment variable names and values (masked unless explicitly revealed).
env:writeCreate, update, or remove environment variables.

Token lifetime

  • A user can have up to 10 active API tokens.
  • Dashboard token expiration choices are 30, 90, or 365 days.
  • Tokens created by the device authorization service expire after 90 days.
  • A token is shown only once when created; revoke unused or exposed tokens.

How API requests authenticate

The API accepts tokens in the Authorization: Bearer header. Query-string tokens are rejected. The CLI adds the header when a command makes an authenticated request.