// SQLite error reference

SQLITE_AUTH: authorization denied

The application's authorizer callback rejected the SQL statement while it was being prepared.

Result code
SQLITE_AUTH
Name
23
Category
Primary result codes
Error message
authorization denied

What it means

SQLITE_AUTH (23) is returned when an authorizer callback, installed with sqlite3_set_authorizer(), tells SQLite a statement is not allowed. Applications use authorizers to sandbox SQL from untrusted sources, for example to allow only reads or to block certain tables or functions. The error comes from your application's policy, not from file permissions.

Common causes

  • The application (or a framework it uses) installed an authorizer that denies the operation, such as writes, ATTACH or a particular table.
  • Running user-supplied SQL through a sandboxed connection.

How to fix it

  1. Check what the authorizer allows and run the statement on a connection that permits it, if that is intended.

  2. If you wrote the authorizer, log the action code and arguments it receives to see which part of the statement was denied.

Related errors

More primary result codes errors

The code and message text are from the SQLite result and error codes documentation. Browse the full SQLite error list or search every database error.

// fewer errors, faster fixes

Work on SQLite in SQLly

A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for SQLite and the other databases you use.