> ## Documentation Index
> Fetch the complete documentation index at: https://usefoil.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Dashboard login API

> Create dashboard login sessions with a Gate agent token and consume one-time login codes from your backend to sign developers in without a password.

Dashboard login sessions allow `npx signup yourproduct login` to authenticate developers into your dashboard without a password.

## Endpoints

* `POST /v1/gate/login-sessions` — Create a login session with `Authorization: Bearer agt_*` plus `{ service_id }`
* `POST /v1/gate/login-sessions/consume` — Consume a login code with `Authorization: Bearer sk_*`

## Notes

* `POST /v1/gate/login-sessions` starts a fresh browser approval flow. A long-lived `agt_*` token alone cannot log a user into the dashboard.
* `POST /v1/gate/login-sessions/consume` requires the `gate:login_sessions:consume` scope.
* New dashboard login sessions can only be created for services that are `active` and publicly discoverable in the registry.

See the [dashboard login guide](/gate/dashboard-login) for integration examples.
