Skip to content

Cloud & infrastructure

Connect a Modal workspace with a Viewer service user, plus an optional write token for just-in-time elevation.

Modal connects with up to two tokens: a read token Dave uses on its own, and an optional write token Dave uses only for changes you approve. Dave reads and writes with the official modal CLI and reads Modal’s docs from modal.com/llms.txt.

Service users need a Modal Team or Enterprise plan.

  1. In Modal, open Settings → Service Users and create a service user, for example dave-read. Copy the token ID (ak-…) and token secret (as-…) — Modal shows the secret once.

  2. Open Settings → Environments and give the service user Viewer on every environment Dave should see.

  3. Optionally create the write token — see Write token.

  4. In Dave, go to Integrations → Add integration → Modal.

  5. Paste the read token ID and secret. Tokens are stored encrypted and never shown again.

  6. Set a Label — see labels.

  7. Optionally check Enable just-in-time writes and paste the write token ID and secret.

  8. Choose Connect Modal. Dave checks the tokens with Modal; you do not need to stay on the page.

Token Access Dave uses it for
Read Service user with Viewer Environments, apps, containers, sandboxes, volumes, secret names, costs
Write Service user with Contributor Approved changes inside those environments
Write Token of a workspace Manager (optional) Also approved workspace changes, and the members and roles view

Optional. Create a second service user, for example dave-write, and give it Contributor on the environments Dave may change. That covers apps, sandboxes, volumes, secrets, dicts and queues.

Modal does not let service users manage the workspace itself. If Dave should also create environments, change environment roles, manage service users or edit settings, paste a token created by a workspace Manager instead (modal token new). With a Manager token, Dave also lists workspace members and their roles.

Dave rejects a write token that belongs to another workspace or is the same as the read token.

Dave stores the write token encrypted. The agent only gets it for a single command you approve — stopping an app, deleting a volume, setting a secret — and every other command runs with the read token. Leave the write token fields blank to keep the workspace read-only.

Deleting the read service user in Modal cuts Dave off; deleting the write service user or token disables writes. Disconnect in Dave stops Dave using both tokens immediately, but does not delete them in Modal.

To replace either token, or to add or remove elevation, disconnect and connect again.

  • Modal rejects the read token — check the token ID and secret, and that the service user still exists.
  • The read token belongs to a workspace member — create a service user with Viewer instead.
  • Dave cannot see an environment — give the read service user Viewer on it.
  • Dave cannot see members or roles — they need a Manager write token; service users cannot read them.