The Glitch Edge API supports two authentication paths. Same routes, same shapes; the auth header just changes.Documentation Index
Fetch the complete documentation index at: https://docs.edge.glitchexecutor.com/llms.txt
Use this file to discover all available pages before exploring further.
1. Session cookie (browser)
The SPA at/app/ sets a glitch_edge_session HTTP-only cookie scoped to
.glitchexecutor.com. Every browser request to /api/* carries it automatically.
Cookie auth is opaque to you — you never see the JWT.
2. Personal API key (scripts + MCP)
Generate from in the app. Token format:Using a token
Pass it as a Bearer token in theAuthorization header:
Python
TypeScript / Node
Token rotation + revocation
- Revoke any time at Settings → API keys. Existing scripts get
401 invalid_api_keyimmediately. - Last-used timestamp is updated on every authed request — handy for spotting forgotten keys.
- We never auto-expire tokens, but you can set
expires_atvia the API on creation if your security model wants finite TTL. (Self-managed; we don’t rotate for you.)
Errors
| HTTP | code | meaning |
|---|---|---|
| 401 | auth_required | No cookie + no Bearer header |
| 401 | invalid_api_key | Bearer was present but malformed / expired / revoked |
| 403 | (no code) | Token resolved to a user that can’t do this action |
Logout / sign-out
- Cookie path:
POST /api/v1/auth/logoutclears the cookie. - API key path: revoke the key. Logging out of a browser session does not affect API keys, and revoking an API key does not log you out of browser sessions.