Add a OTP SMS authenticator
POST/v3alpha/users/:userId/otp_sms
Add a new one-time-password (OTP) SMS authenticator to a user. If the phone is not passed as verified, a verification code will be generated, which can be either returned or will be sent to the user by SMS.
Request​
Path Parameters
unique identifier of the user.
- application/json
- application/grpc
- application/grpc-web+proto
Body
required
phone
object
Set the user's phone for the OTP SMS authenticator and it's verification state.
Possible values: non-empty
and <= 20 characters
Set the user's phone number.
Let ZITADEL send the link to the user via SMS.
Get the code back to provide it to the user in your preferred mechanism.
Set the phone as already verified.
Body
required
phone
object
Set the user's phone for the OTP SMS authenticator and it's verification state.
Possible values: non-empty
and <= 20 characters
Set the user's phone number.
Let ZITADEL send the link to the user via SMS.
Get the code back to provide it to the user in your preferred mechanism.
Set the phone as already verified.
Body
required
phone
object
Set the user's phone for the OTP SMS authenticator and it's verification state.
Possible values: non-empty
and <= 20 characters
Set the user's phone number.
Let ZITADEL send the link to the user via SMS.
Get the code back to provide it to the user in your preferred mechanism.
Set the phone as already verified.
Responses​
- 200
- 403
- 404
- default
OTP SMS authenticator successfully added
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
Schema
details
object
on read: the sequence of the last event reduced by the projection
on manipulation: the timestamp of the event(s) added by the manipulation
on read: the timestamp of the last event reduced by the projection
on manipulation: the timestamp of the event(s) added by the manipulation
unique identifier of the OTP SMS registration.
The OTP verification code will be set if a phone was set with a return_code verification option.
{
"details": {
"sequence": "2",
"changeDate": "2024-06-25T13:35:39.232Z",
"resourceOwner": "69629023906488334"
},
"otpSmsId": "163840776835432705",
"verificationCode": "SKJd342k"
}
- Schema
- Example (from schema)
Schema
details
object
on read: the sequence of the last event reduced by the projection
on manipulation: the timestamp of the event(s) added by the manipulation
on read: the timestamp of the last event reduced by the projection
on manipulation: the timestamp of the event(s) added by the manipulation
unique identifier of the OTP SMS registration.
The OTP verification code will be set if a phone was set with a return_code verification option.
{
"details": {
"sequence": "2",
"changeDate": "2024-06-25T13:35:39.232Z",
"resourceOwner": "69629023906488334"
},
"otpSmsId": "163840776835432705",
"verificationCode": "SKJd342k"
}
- Schema
- Example (from schema)
Schema
details
object
on read: the sequence of the last event reduced by the projection
on manipulation: the timestamp of the event(s) added by the manipulation
on read: the timestamp of the last event reduced by the projection
on manipulation: the timestamp of the event(s) added by the manipulation
unique identifier of the OTP SMS registration.
The OTP verification code will be set if a phone was set with a return_code verification option.
{
"details": {
"sequence": "2",
"changeDate": "2024-06-25T13:35:39.232Z",
"resourceOwner": "69629023906488334"
},
"otpSmsId": "163840776835432705",
"verificationCode": "SKJd342k"
}
Returned when the user does not have permission to access the resource.
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Returned when the resource does not exist.
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
An unexpected error response.
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}