err:user:bad_request:permissions_query_syntax_errorpermissions string you sent to keys.verifyKey isn’t a valid permission query. You get HTTP 400 before the key is checked, and detail gives the position of the problem and what was expected there.
Example response
Likely causes
- You wrote
&&or||instead ofANDorOR. - You put quotes around slugs.
- A
(has no matching), or a group is empty:(). - A slug has a character outside the allowed set: letters, numbers, dots, underscores, hyphens, slashes, colons, asterisks, and parentheses.
- A token is where an operator or slug was expected, or the query is blank.
err:unkey:application:invalid_input instead.
How to fix
- Fix the query at the position named in
detail. - Write it as slugs joined with
ANDandOR, grouped with parentheses. For example:documents.read AND (billing.read OR billing.write). - If you build the query from user input, validate it first. A syntax error fails the whole request instead of returning
valid: false.
Related errors
err:unkey:authorization:insufficient_permissions: the query parsed but your root key lacks a permission the endpoint needs.err:unkey:application:invalid_input: another field of the request failed validation.