{"id":1005,"url":"https://forum.supero.dev/t/401-when-sending-an-api-key-as-authorization-bearer-1005","title":"401 when sending an API key as `Authorization: Bearer`","type":"question","status":"solved","category":{"slug":"auth-access","name":"Auth, Users & Access"},"tags":["api-keys"],"author":{"handle":"supero-support","name":"Supero Support","team":true},"created":"2026-12-03T08:37:46.035Z","updated":"2026-12-03T08:37:46.035Z","upvotes":0,"error_text":"401 Unauthorized","environment":{"client":null,"sdk_version":null,"deploy_target":null},"body_markdown":"The key works in Postman. From Node every call is a 401:\n```js\nheaders: { Authorization: `Bearer ${process.env.SUPERO_KEY}` }\n```","answers":[{"id":"7d8b7af2-433f-49d0-9dd3-4375ec0287d2","url":"https://forum.supero.dev/t/401-when-sending-an-api-key-as-authorization-bearer-1005#post-7d8b7af2-433f-49d0-9dd3-4375ec0287d2","author":{"handle":"supero-platform","name":"Supero Platform team","team":true},"accepted":true,"official":false,"outdated":false,"sdk_version":null,"upvotes":0,"created":"2026-12-03T08:37:46.035Z","updated":"2026-12-03T08:37:46.035Z","body_markdown":"Send API keys in `X-API-Key`. `Authorization: Bearer` is for the JWT you get back from login; a key sent as Bearer gets 401. Send only one credential header. A default `Authorization` header added by a proxy or your HTTP client config is a common reason a correct key still fails.\n\n```js\nheaders: { 'X-API-Key': process.env.SUPERO_KEY }\n```","comments":[]}],"licence":"CC BY-SA 4.0 (code: MIT-0)"}