Skip to main content

Send SMS and Email Verification Code

POST 

/auth/v1/verification

Interface Description

Send SMS and email verification codes. The mobile number and email should be provided based on the verification scenario and cannot be provided simultaneously.

Prerequisites

  • You need to enable mobile number or email login on the CloudBase platform.
  • Email login requires proper configuration of the SMTP server

Subsequent Login Process

  • When is_user is true, call the login interface directly.
  • When is_user is null or false, call the registration interface to register and then log in.

Request

Header Parameters

    x-captcha-token string

    Captcha token, obtained from the captcha verification interface /auth/v1/captcha/data/verify. Required when the interface returns the error 'captcha_required'

Body

    phone_number Phone number (string)

    Valid domestic mobile number, must include the "+86" prefix, e.g., "+86 15588665555"

    email Email (string)

    Valid email address in the format abc@xxx

    target Target for sending verification code (string)required

    Pass ANY; other options: USER (account must exist in the system), NOT_USER (account must not exist in the system)

Responses

Response Headers
    Schema
      verification_id Verification ID (string)

      Used to pass to the SMS/email verification interface /auth/v1/verification/verify for captcha validation

      expires_in Expiration time in seconds (integer)
      is_user User existence status (boolean)

      Determines if the phone number or email has been registered as a user; returns true if registered

    Loading...