# SQLITE_AUTH: SQLITE_AUTH: authorization denied

> A registered authorizer callback denied an action. Rare in libSQL clients; remote auth failures use HTTP 401 or 403 instead.

Source: https://sqlly.app/errors/libsql/sqlite-auth
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: `SQLITE_AUTH`
- Name: `23`
- Category: Local SQLite errors

Error message:

```text
authorization denied
```

## What it means

`SQLITE_AUTH` (23) is returned when an application set a `sqlite3_set_authorizer()` callback and that callback returned `SQLITE_DENY` for an action. It is an application-level hook, not something a normal libSQL client sets, so this is rare. Authentication against a remote Turso database does not use this code: it fails with HTTP 401 or 403.

## Common causes

- An embedding application registered an authorizer that denied the action.
- An ORM or wrapper enabled an authorizer for row-level policies and your statement hit a denied action.

## How to fix it

1. Check with the embedding application's authors; the denial comes from its policy, not from SQLite itself.

## Reproduce it safely

```sql
Needs an embedding that registers an authorizer: write a small C or Rust program that calls `sqlite3_set_authorizer()` and returns `SQLITE_DENY` for one action, then run the denied statement. @libsql/client and the Turso SDKs expose no authorizer API, so there is no honest client-only repro.
```

## How SQLly helps

SQLly sets no authorizer when it opens a SQLite file, so a statement denied with SQLITE_AUTH inside an embedding usually runs in SQLly, and that contrast pins the denial to the embedding's policy.

## Questions

### What does SQLITE_AUTH mean in SQLite?

An application registered a `sqlite3_set_authorizer()` callback and that callback returned SQLITE_DENY for the action. It is result code 23, and it comes from application policy, not from the database file.

### Do Turso or libSQL servers return SQLITE_AUTH for bad auth tokens?

No. Remote authentication failures surface as HTTP 401 (invalid or expired token) or 403 (no permission). SQLITE_AUTH belongs to the local authorizer hook.

## Related errors

- [`SQLITE_BUSY`](https://sqlly.app/errors/libsql/busy): SQLITE_BUSY: the database is busy
- [`401 Unauthorized`](https://sqlly.app/errors/libsql/unauthorized-401): 401 Unauthorized: bad or missing auth token
- [`403 Forbidden`](https://sqlly.app/errors/libsql/forbidden-403): 403 Forbidden: no permission for this resource

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