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
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,
ATTACHor a particular table. - Running user-supplied SQL through a sandboxed connection.
How to fix it
-
Check what the authorizer allows and run the statement on a connection that permits it, if that is intended.
-
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
SQLITE_ERRORSQL logic errorSQLITE_ABORTquery abortedSQLITE_BUSYdatabase is lockedSQLITE_LOCKEDdatabase table is lockedSQLITE_NOMEMout of memorySQLITE_INTERRUPTinterruptedSQLITE_IOERRdisk I/O errorSQLITE_CORRUPTdatabase disk image is malformed
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.
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.