ato.run authentication
Updated 2026-11-13
| Environment | ato.run | API |
|---|---|---|
| Staging | https://stg-app.ato.run | https://staging.api.ato.run |
| Production | https://ato.run | https://api.ato.run |
Use the site and API from the same environment. Staging and production have separate sessions and data.
Web sign-in and sessions
Sign in to ato.run with a registered passkey or a one-time email code. After verifying your email, you can register a passkey in a supported browser.
| Method and path | Purpose |
|---|---|
GET /api/auth/session | Check the current account. With no session, the response is JSON null. |
POST /api/auth/signout | End the current browser session. |
The first-party ato.run web client uses credentials: "include" in fetch to send its session cookie to the API. For CLI or Desktop access, use that client's sign-in flow to connect the device.
Email sign-in requests a code with POST /api/auth/email-otp/send-verification-otp and verifies it with POST /api/auth/sign-in/email-otp. Sending a code requires the sign-in screen's Turnstile verification. A successful send response alone does not confirm that the account exists or that the message was delivered.
Apps hosted by ato.run
When an app requires login, ato.run directs the user to sign in and checks access to the Instance on return. App code calls Data Ports on its own origin. The browser sends the session cookie, so the app does not need a session token. If the bridge returns 401 auth_required, sign in and reopen the app.
OAuth for MCP clients
Connect a remote MCP client to /v1/mcp on the API for the chosen environment. The client can discover the issuer, protected resource, and supported scopes from these documents.
Authorization uses Authorization Code with PKCE (S256). Use a registered redirect URI and supply the MCP URL as the resource. After the user signs in and consents on ato.run, the client exchanges the code at /oauth/token and sends the access token in the Authorization: Bearer header for MCP requests. Reading data or executing operations also requires the corresponding permission for that app.
The token delegates MCP access. It cannot retrieve a general user profile or call /v1/data-resources. The user can disconnect the client in Connected AI. See Using ato.run with AI for the connection steps.