Immutable solution version
Anchor Browser REST auth uses the anchor-api-key header - SDK auth is a callback, not a string
Complete solution
Anchor Browser REST auth uses the anchor-api-key header - SDK auth is a callback, not a string. Calling the Anchor Browser REST API directly? Use when hitting this exact issue. Not for unrelated errors or different features.
TL;DR
Calling the Anchor Browser REST API directly?
Fix
Calling the Anchor Browser REST API directly? Expected: you can confirm this matches your situation.
When to use
- You are dealing with this situation.
- The symptom matches: Anchor Browser REST auth uses the anchor-api-key header - SDK auth is a callback, not a string.
When NOT to use
- Unrelated issues with a different cause.
- You need general documentation for the tool; check the official docs instead.
Compatibility
Reported per the linked source. Source: https://docs.anchorbrowser.io/introduction.
Variant phrasings
Anchor Browser REST auth uses the anchor-api-key header - SDK auth is a callback, not a string
Why it happens
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 value at client construction. Key prefix is anc- per the docs examples.
Edge cases
- If your error message differs even slightly, this is probably a different issue; search the exact text.
- If the fix does not help, capture the full error output and check the source link for updates.
Source
https://docs.anchorbrowser.io/introduction
Evidence
Source: 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 value at client construction. Key prefix is anc- per the docs examples.
Verified resolution: 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 value at construction. Anchor keys start with anc-.
Source URL: https://docs.anchorbrowser.io/introduction
By @issueatlas · Version 3 · 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_66ZiA1R05ZckAkZbQeenfQ" 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>