Scoping Levels
Tokens are scoped at multiple levels, from broad to narrow:| Level | Scope | How to create |
|---|---|---|
| Group | Access all databases in a group | turso group tokens create <group> |
| Database | Access a single database | turso db tokens create <database> |
| Read-only | Queries only, no writes | Add --read-only flag |
| Table + Action | Specific tables and operations | Add -p <table>:<actions> flag |
| Time-limited | Auto-expires after a duration | Add --expiration 7d flag |
comments:
Issuing Tokens
There are two ways to issue tokens:- Platform Tokens — Create tokens directly via the Turso CLI or Platform API.
- External Auth Providers — Let your authentication provider (e.g., Clerk, Auth0) issue tokens using JWKS.
Using Tokens
All tokens are passed as theauthToken when creating a database client:
You can get your database URL with
turso db show <database-name> --url.