POST /v1/auth/phone/otp/verify
POST
/v1/auth/phone/otp/verifyHeader parameters
x-request-idstringOptional caller-provided request identifier
x-correlation-idstringOptional caller-provided correlation identifier
Request body
requiredapplication/jsonVerify a phone SMS OTP challenge and create a session
challenge_idstringrequiredcodestringrequireddevice_idstring | nullResponses
200Phone OTP verification successful
expires_atstring<date-time>requiredprimary_identifierPhoneSessionPrimaryIdentifierrequiredShow propertiesHide properties
country_codestringrequiredkindstringrequiredmasked_national_numberstringrequiredsession_idstringrequiredtokenstringrequireduser_idstringrequired400Request validation failed
codestringrequiredcorrelation_idstring | nulldetailstringrequirederrorsProblemErrorDetail[]requiredShow propertiesHide properties
Array of
ProblemErrorDetailfieldstring | nullreasonstringrequirednext_actionsstring[] | nullrequest_idstring | nullstatusinteger<int32>requiredmin 100 · max 599
titlestringrequiredtypestringrequired401Invalid or expired phone OTP
codestringrequiredcorrelation_idstring | nulldetailstringrequirederrorsProblemErrorDetail[]requiredShow propertiesHide properties
Array of
ProblemErrorDetailfieldstring | nullreasonstringrequirednext_actionsstring[] | nullrequest_idstring | nullstatusinteger<int32>requiredmin 100 · max 599
titlestringrequiredtypestringrequired500Internal server error
codestringrequiredcorrelation_idstring | nulldetailstringrequirederrorsProblemErrorDetail[]requiredShow propertiesHide properties
Array of
ProblemErrorDetailfieldstring | nullreasonstringrequirednext_actionsstring[] | nullrequest_idstring | nullstatusinteger<int32>requiredmin 100 · max 599
titlestringrequiredtypestringrequiredRequest
curl -X POST "/v1/auth/phone/otp/verify" \
-H "Content-Type: application/json" \
-d '{
"challenge_id": "string",
"code": "string",
"device_id": "string"
}'const response = await fetch("/v1/auth/phone/otp/verify", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"challenge_id": "string",
"code": "string",
"device_id": "string"
})
});import requests
response = requests.post(
"/v1/auth/phone/otp/verify",
headers={
"Content-Type": "application/json"
},
json={
"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"
}{
"code": "string",
"correlation_id": "string",
"detail": "string",
"errors": [
{
"field": "string",
"reason": "string"
}
],
"next_actions": [
"string"
],
"request_id": "string",
"status": 0,
"title": "string",
"type": "string"
}{
"code": "string",
"correlation_id": "string",
"detail": "string",
"errors": [
{
"field": "string",
"reason": "string"
}
],
"next_actions": [
"string"
],
"request_id": "string",
"status": 0,
"title": "string",
"type": "string"
}{
"code": "string",
"correlation_id": "string",
"detail": "string",
"errors": [
{
"field": "string",
"reason": "string"
}
],
"next_actions": [
"string"
],
"request_id": "string",
"status": 0,
"title": "string",
"type": "string"
}