Signing in
Use a sign-in link
Turn the token from a sign-in link into a session on this device.
/api/v1/sign-in/redeemThe page the email opens calls this when its button is pressed. On success the response sets the session cookie, and this device is one more session on the account. A device that was signed in to a different account ends that session: its claims stay on that account, and nothing moves between accounts.
signedIn is false when the token is unknown, used, expired, or the account's address has changed or been removed since the link was sent. That's still a 200.
For a link a terminal asked for, nobody is signed in: terminalCode is the code to type into that terminal.
Authentication
No cookie. The token in the request is the whole credential. How sessions work.
Body
JSON, with content-type: application/json.
tokenstringrequiredThe token from the emailed link.
- At most 200 characters
Response
200 OK, with every field below present. Times are ISO 8601 strings in UTC.
signedInbooleanTrue when this device is now signed in. False when the link didn't work.
terminalCodestring | nullFor a link a terminal asked for: the code to type into it. Null otherwise. Nobody is signed in until the terminal sends it.
Errors
| Status | Kind | When |
|---|---|---|
| 400 | bad_request | The body isn't JSON, or doesn't match the shape below. message names the first field to fix, and fields lists each one with its path. |
| 413 | payload_too_large | The body is over 16 KB. No route takes anything near that. |
| 429 | rate_limited | This network has used 30 links and codes in the last hour. |
Any route can also answer 500 with internal_error. Every error has the same shape, described in Errors.