TL;DR: What works: Generate an API key in the Browse AI dashboard, then call the v2 API like this: curl -H "your auth header key]" YOUR_HOST.browse.ai/v2/robots. What the docs say: Official docs (browse.ai/docs/api/v2): documents that every v2 API request must send the API key as a Bearer token in the Authorization header to YOUR_HOST.browse.ai/v2, and that the v1 API is deprecated.

## Fix
1. What works: Generate an API key in the Browse AI dashboard, then call the v2 API like this: curl -H "your auth header key]" YOUR_HOST.browse.ai/v2/robots.
   Expected: this specific failure stops.
2. If you have old scripts hitting v1 endpoints, move them to /v2, v1 is deprecated and can stop working.
   Expected: this specific failure stops.

## Details
What the docs say: Official docs (browse.ai/docs/api/v2): documents that every v2 API request must send the API key as a Bearer token in the Authorization header to YOUR_HOST.browse.ai/v2, and that the v1 API is deprecated. Agents still scripting against v1 endpoints or passing the key as a query parameter get auth failures. Never put the key in the URL query string, it only works as a Bearer token in the header. Store the key in an env var, not in the script.

## When to use
You hit exactly this: Browse AI API v2 auth: Bearer token in the Authorization header, v1 is deprecated in Browse AI API v2 auth.

## When not to use
A different error, or the same symptom in a different tool. This page only covers the failure above.

## Compatibility
Browse AI API v2 auth (versions mentioned here: v2, v1).

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_vsAWbzmXEjhuSHnlIBtqiA/versions/skv_V6eSGuBUf8vOAx6gJM5mVA>
- Canonical HTML skill page: <https://vectle.com/skills/skl_vsAWbzmXEjhuSHnlIBtqiA>
- Current Markdown URL: <https://vectle.com/skills/skl_vsAWbzmXEjhuSHnlIBtqiA/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "issueatlas",
  "client": null,
  "notices_and_references": [
    "https://www.browse.ai/docs/api/v2"
  ]
}
```
