# 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.

Source: https://sqlly.app/errors/libsql/forbidden-403
Last updated: 2026-11-30
License: Text and data [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) (credit SQLly, sqlly.app); code and SQL snippets [MIT](https://opensource.org/license/mit). [Details](https://sqlly.app/license).
Note: Quoted error message text belongs to its database vendor.

- Error: `403 Forbidden`
- Category: Authentication and tokens

Error message:

```text
Server returned HTTP status 403 Forbidden
```

## 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.

## How to fix it

1. Mint a token with the access the statement needs. Read-write is the default:

   ```sql
   turso db tokens create mydb
   ```
2. If you need read-only by design, keep it but do the writes with a separate full token:

   ```sql
   turso db tokens create mydb --read-only
   ```
3. Check which organization and databases you can see:

   ```sql
   turso org list
   turso db list
   ```
4. If the database is in another org, ask an owner to grant access or point your URL at a database you own:

   ```sql
   turso db show mydb --url
   ```

## Reproduce it safely

```sql
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.
```

## How SQLly helps

SQLly sends the write with the saved token and shows the server's refusal unchanged, so a read-only token fails on the first INSERT with 403 while reads keep working, which is the split that identifies the token scope.

## 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 Unauthorized`](https://sqlly.app/errors/libsql/unauthorized-401): 401 Unauthorized: bad or missing auth token
- [`404 Not Found`](https://sqlly.app/errors/libsql/database-not-found-404): 404 Not Found: unknown database or endpoint
- [`auth token expired`](https://sqlly.app/errors/libsql/token-expired): Auth token expired

The code and message text are from the [libSQL / Turso documentation](https://docs.turso.tech/).
