403 Forbidden: 403 Forbidden: no permission for this resource
The token is valid but the account or token is not allowed to touch this database or operation.
- Error
403 Forbidden- Category
- Authentication and tokens
What it means
Turso's docs describe 403 as: you do not have permission to access this resource. Unlike 401, the token itself passed validation. The refusal comes from what the token or your account is allowed to do. Common shapes: a read-only token used for a write, a member account that lacks access to the organization's database, or a plan limit that blocks the operation.
Common causes
- A read-only token was used for a write statement. Turso lets you mint read-only tokens.
- Your account is a member without access to the organization or database the URL points to.
- The token was minted for a database in another organization that your account cannot see.
- The operation needs platform API access that the database token does not carry.
Find the cause
Run `turso db list` and confirm the database appears. If it does not, your account has no access and 403 is expected. If it does appear, the token is the problem: decode it and compare with a freshly minted token for the same database. A read-only token failing only on writes is the clearest signal.
How to fix it
-
Mint a token with the access the statement needs. Read-write is the default:
turso db tokens create mydb
-
If you need read-only by design, keep it but do the writes with a separate full token:
turso db tokens create mydb --read-only
-
Check which organization and databases you can see:
turso org list turso db list
-
If the database is in another org, ask an owner to grant access or point your URL at a database you own:
turso db show mydb --url
Other ways to handle it
For team setups, use organization membership rather than sharing personal tokens. For local development, turso dev or a file URL has no permission model at all.
Reproduce it safely
Reproducing 403 honestly needs two Turso accounts or a read-only token: create a database with `turso db create repro403`, mint a token with `--read-only`, then run an INSERT through @libsql/client to get SERVER_ERROR 403. `turso dev` cannot reproduce it because it skips auth.
Questions
How do I create a read-only token for a Turso database?
turso db tokens create mydb --read-only. A write through a read-only token answers 403. Keep one read-only token for readers and a separate full token only where writes happen.
What is the difference between 401 and 403 on Turso?
401 means the token itself was rejected (missing, malformed, expired, or for another database). 403 means the token was accepted but the account or token is not allowed to touch that resource, for example a read-only token doing a write.
Why do I get 403 when I can see the database in the Turso dashboard?
The dashboard uses your logged-in account; the app uses a token. Run turso db list with the same credentials your app has: if the database is not listed, your account lacks access to that organization and an owner must grant it.
Related errors
401 Unauthorized401 Unauthorized: bad or missing auth token404 Not Found404 Not Found: unknown database or endpointauth token expiredAuth token expired
More authentication and tokens errors
The code and message text are from the libSQL / Turso documentation. Browse the full libSQL error list or search every database error.
Work on libSQL in SQLly
A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for libSQL and the other databases you use.
Text and data on this page: CC BY 4.0, credit SQLly (sqlly.app). Code and SQL snippets: MIT. License details Quoted error message text belongs to its database vendor. View as Markdown