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
Captcha token, obtained from the captcha verification interface /auth/v1/captcha/data/verify. Required when the interface returns the error 'captcha_required'
- application/json
Body
Valid domestic mobile number, must include the "+86" prefix, e.g., "+86 15588665555"
Valid email address in the format abc@xxx
Pass ANY; other options: USER (account must exist in the system), NOT_USER (account must not exist in the system)
Responses
- 200
Response Headers
- application/json
- Schema
- Example (from schema)
- Example
Schema
Used to pass to the SMS/email verification interface /auth/v1/verification/verify for captcha validation
Determines if the phone number or email has been registered as a user; returns true if registered
{
"verification_id": "string",
"expires_in": 0,
"is_user": true
}
{
"verification_id": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjlkMWRjMzFlLWI0ZDAtNDQ4Yi1hNzZmLWIwY2M2M2Q4MTQ5OCJ9.eyJlIjoidG9wc29ud2FuZzE2M0AxNjMuY29tIiwiZXhwIjoxNzQ3OTc0MjUxLCJraWQiOiJmY2JlMzBlZC1mNTc3LTRhMDQtOWIyZi05YTI4ZTc0NjA5MzQiLCJwaiI6Imxvd2NvZGUtNWc5YWMyMHUyYTI3ZGE0NiIsInQiOiJBR055Y0hRT0F3NjN4MUhBIn0.lZ_HWAsLDKKswTQONNY1DP9KlvYZK17gFM5ViubWzQDbHyLnOB-H0CtQgDXeDIqN_qKD82HEIst-IpQXefhEjQY1rD1bhUwYxD23MRjl_fQVt-rYbcrM7Ibls0-by6Rqlso7-wR6VrG_TRujHg_ueecw6KbKB5kCfqGXG5AMcjYJFDMQyL1gpNvrJ50lJQdIlBn6S-Hkch_5qGJBnLO9EVtfkmqoPo7-MemiptsyLcN8adWMuhVOG-60NwaF6nLJob62YdV7NTfTfcgAoPB2VKpbITrZvq7LKLA3J2mMz_LDiARl0DcdcxDJOjejgxpWgnz9vvRsmVlcjK8xuoyeZg",
"expires_in": 600
}