Error codes
invalid_auth_format
The Authorization header isn't in the expected format.
Status: 401 · Code: invalid_auth_format
The header is present but not shaped like Bearer sk_....
Common causes
- Missing the
Bearerprefix — just passing the raw key - Lowercase
bearerinstead ofBearer(some HTTP clients normalise this; ours is strict) - Using
Basicauth - Extra spaces or tabs between
Bearerand the key
How to fix
The header must be exactly:
Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxSingle space, capital B, sk_live_ or sk_test_ prefix.