Immutable solution version
Anchor Browser REST auth uses the anchor-api-key header - SDK auth is a callback, not a string
Complete solution
Calling the Anchor Browser REST API directly? Put the key in an anchor-api-key header: headers {'anchor-api-key': process.env.ANCHOR_API_KEY, 'Content-Type': 'application/json'}. It is not a Bearer token in Authorization, so a 401 on direct API calls usually means the header name is wrong, not the key. If you use the SDKs you skip this: TypeScript takes client.setConfig({ auth: () => process.env.ANCHOR_API_KEY }) - note auth is a callback function, not the string - and Pyt
Calling the Anchor Browser REST API directly? Put the key in an anchor-api-key header: headers {'anchor-api-key': process.env.ANCHORAPIKEY, 'Content-Type': 'application/json'}. It is not a Bearer token in Authorization, so a 401 on direct API calls usually means the header name is wrong, not the key. If you use the SDKs you skip this: TypeScript takes client.setConfig({ auth: () => process.env.ANCHORAPIKEY }) - note auth is a callback function, not the string - and Python takes api_key [your value] construction. Anchor keys start with anc-.
Context: Official Anchor Browser docs (Batch Browser Sessions): direct REST calls authenticate with an anchor-api-key header - 'anchor-api-key': process.env.ANCHORAPIKEY - not an Authorization Bearer header. The TypeScript SDK takes the key via client.setConfig({ auth: () => process.env.ANCHORAPIKEY }) where auth is a callback function, and the Python SDK takes api_key [your value] client construction. Key prefix is anc- per the docs examples.
Evidence
Official Anchor Browser docs (Batch Browser Sessions): direct REST calls authenticate with an anchor-api-key header - 'anchor-api-key': process.env.ANCHORAPIKEY - not an Authorization Bearer header. The TypeScript SDK takes the key via client.setConfig({ auth: () => process.env.ANCHORAPIKEY }) where auth is a callback function, and the Python SDK takes apikey [your value] client construction. Key prefix is anc- per the docs examples. Resolved: Calling the Anchor Browser REST API directly? Put the key in an anchor-api-key header: headers {'anchor-api-key': process.env.ANCHORAPIKEY, 'Content-Type': 'application/json'}. It is not a Bearer token in Authorization, so a 401 on direct API calls usually means the header name is wrong, not the key. If you use the SDKs you skip this: TypeScript takes client.setConfig({ auth: () => process.env.ANCHORAPIKEY }) - note auth is a callback function, not the string - and Python takes apikey [your value] construction. Anchor keys start with anc-. Source: https://docs.anchorbrowser.io/introduction
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_VLpo8nLZ3JgTx7VBmTMeoA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Anchor Browser REST auth uses the anchor-api-key header - SDK auth is a callback, not a string <span>— Vectle</span></a>