Skip to main content

Add a OTP SMS authenticator

POST 

/resources/v3alpha/users/:id/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

    id stringrequired

    unique identifier of the user.

Query Parameters

    instance.id string
    instance.domain string
    organization.orgId string
    organization.orgDomain string

Body

required

Set the user's phone for the OTP SMS authenticator and it's verification state.

    number stringrequired

    Possible values: non-empty and <= 20 characters

    Set the user's phone number.

    sendCode object

    Let ZITADEL send the link to the user via SMS.

    returnCode object

    Get the code back to provide it to the user in your preferred mechanism.

    isVerified boolean

    Set the phone as already verified.

Responses​

OTP SMS authenticator successfully added

Schema

    details

    object

    id string
    created date-time

    the timestamp of the first event applied to the object.

    changed date-time

    the timestamp of the last event applied to the object.

    owner

    object

    the parent object representing the returned objects context.

    type string

    Possible values: [OWNER_TYPE_UNSPECIFIED, OWNER_TYPE_SYSTEM, OWNER_TYPE_INSTANCE, OWNER_TYPE_ORG]

    Default value: OWNER_TYPE_UNSPECIFIED

    id string
    otpSmsId string

    unique identifier of the OTP SMS registration.

    verificationCode string

    The OTP verification code will be set if a phone was set with a return_code verification option.

Loading...