Skip to main content
POST
/
auth
/
verify
cURL
curl --request POST \
  --url https://our-secret-api-url.com/auth/verify \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <x-api-key>' \
  --data '
{
  "code": "<string>",
  "userId": 123,
  "isPhone": true
}
'
{
  "id": "<string>",
  "expiresAt": "2023-11-07T05:31:56Z",
  "fresh": true,
  "userId": 123
}

Headers

X-API-KEY
string
required

API key required for authentication

Body

application/json
code
string
required

OTP code

userId
integer
required

User ID

isPhone
boolean
required

Indicates if the code is for phone verification

Response

OTP code successfully verified and session created

id
string
required

Session ID (token)

expiresAt
string<date-time>
required

Session expiration time

fresh
boolean
required

Indicates if the session is fresh

userId
integer
required

User ID