Skip to main content
Private preview: this is rolling out and may not be available on your account yet.
First-party only today. Personal access tokens are issued to Sumvin’s own apps and approved clients. They are not yet open to third-party apps, so an outside developer can’t complete this flow. To give your own agent access to Sumvin, use the MCP connector or the CLI.
Acting for a person takes one credential: a personal access token. The person approves it in their own browser; your code never sees their password.
1

Start the browser sign-in

deviceLogin needs an unauthenticated client. It calls onUserCode once, with the address and short code to show the person, then waits for them to approve.
Show the address and code before you do anything else, such as opening a browser, so a person on a remote terminal can still sign in.
2

Store the token

deviceLogin returns the token and never stores it. Keep credential.token wherever you keep secrets.
3

Authenticate with it

sumvinPat takes the token, or a function that returns it.In production, personal access tokens only work from approved Sumvin clients, identified by their user-agent. A request that carries the token from any other client, or with no user-agent, is refused with 403 and code CLI-403-001.

When sign-in fails

Each failure is its own error class, and all of them extend DeviceLoginError. To stop waiting, pass an AbortSignal as signal.

Carrying a Stamped Mandate

An agent that holds a Stamped Mandate token sends it with pintToken. It always travels alongside the personal access token, never instead of it: a request with only a mandate token is refused.
A mandate token only ever narrows what the request may do. It never grants more than the person’s own access.