Create a Home Assistant long-lived access token and use it to authenticate a script's REST API calls

domain: home-assistant.io · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. In the Home Assistant user profile page, open the Security tab and select Long-Lived Access Tokens
  2. Click Create Token, name it, and copy the token string immediately since it is only shown once
  3. Store the token securely outside source control, since it cannot be retrieved again from the UI
  4. Send it as an Authorization: Bearer <token> header on requests to Home Assistant's /api/ REST endpoints
  5. Revoke the token from the same Security tab if it is ever compromised

Known gotchas

Related routes

Authenticate to Hostaway API with client-credentials and manage the long-lived token
api.hostaway.com · 5 steps · unrated
Control Home Assistant devices and automate via the REST API and WebSocket API
home-assistant.io · 6 steps · unrated
Create a Tailscale OAuth client, exchange its credentials for a short-lived API access token, and call the Tailscale API with it.
tailscale.com · 7 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans