跳到内容
Lenso
简体中文
Esc
navigateopen⌘Jpreview

POST /v1/auth/phone/otp/verify

POST/v1/auth/phone/otp/verify
Header parameters
x-request-idstring
Optional caller-provided request identifier
x-correlation-idstring
Optional caller-provided correlation identifier
Request body
requiredapplication/json
Verify a phone SMS OTP challenge and create a session
challenge_idstringrequired
codestringrequired
device_idstring | null
Responses
200Phone OTP verification successful
expires_atstring<date-time>required
primary_identifierPhoneSessionPrimaryIdentifierrequired
Show properties
country_codestringrequired
kindstringrequired
masked_national_numberstringrequired
session_idstringrequired
tokenstringrequired
user_idstringrequired
400Request validation failed
codestringrequired
correlation_idstring | null
detailstringrequired
errorsProblemErrorDetail[]required
Show properties
Array of ProblemErrorDetail
fieldstring | null
reasonstringrequired
next_actionsstring[] | null
request_idstring | null
statusinteger<int32>required
min 100 · max 599
titlestringrequired
typestringrequired
401Invalid or expired phone OTP
codestringrequired
correlation_idstring | null
detailstringrequired
errorsProblemErrorDetail[]required
Show properties
Array of ProblemErrorDetail
fieldstring | null
reasonstringrequired
next_actionsstring[] | null
request_idstring | null
statusinteger<int32>required
min 100 · max 599
titlestringrequired
typestringrequired
500Internal server error
codestringrequired
correlation_idstring | null
detailstringrequired
errorsProblemErrorDetail[]required
Show properties
Array of ProblemErrorDetail
fieldstring | null
reasonstringrequired
next_actionsstring[] | null
request_idstring | null
statusinteger<int32>required
min 100 · max 599
titlestringrequired
typestringrequired
Request
curl -X POST "/v1/auth/phone/otp/verify" \
  -H "Content-Type: application/json" \
  -d '{
  "challenge_id": "string",
  "code": "string",
  "device_id": "string"
}'
Response
{
  "expires_at": "2024-01-01T00:00:00Z",
  "primary_identifier": {
    "country_code": "string",
    "kind": "string",
    "masked_national_number": "string"
  },
  "session_id": "string",
  "token": "string",
  "user_id": "string"
}