v16

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-01720230.5 KB
OTP

Sign in with a code

post/auth/otp/sign-in

Request body

codestring required

A 45-character verification code. For magic links, this is the code found in the "code" URL query parameter. For OTP, this is formed by concatenating the 6-digit code entered by the user with the nonce (received during code creation)

Example request

{
  "code": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2"
}

Response

Successful response

refresh_tokenstring required

Long-lived refresh token that can be used to obtain a new access token

access_tokenstring required

Short-lived access token that can be used to authenticate the user

is_new_userboolean required

Whether the user is a new user

user_idstring required

The unique identifier of the user

Example response

{
  "refresh_token": "i8ns3aq2...14y",
  "access_token": "eyJhmMiJB2TO...diI4QT",
  "is_new_user": true,
  "user_id": "3241a285-8329-4d69-8f3d-316e08cf140c"
}