prufy
Skip to the page

Signing inUse a sign-in link

Signing in

Use a sign-in link

Turn the token from a sign-in link into a session on this device.

POST/api/v1/sign-in/redeem

The 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.

  • tokenstringrequired

    The token from the emailed link.

    • At most 200 characters

Response

200 OK, with every field below present. Times are ISO 8601 strings in UTC.

  • signedInboolean

    True when this device is now signed in. False when the link didn't work.

  • terminalCodestring | null

    For a link a terminal asked for: the code to type into it. Null otherwise. Nobody is signed in until the terminal sends it.

Errors

StatusKindWhen
400bad_requestThe 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.
413payload_too_largeThe body is over 16 KB. No route takes anything near that.
429rate_limitedThis 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.