Skip to content

Send Mobile SMS Verification Code

Interface Address:/v2/sms/enduserapi/v2/sendPhoneSmsCode

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Interface Description:Send mobile SMS verification code. The last unused SMS verification code sent within 5 minutes is valid

Request Parameters:

Parameter NameParameter DescriptionRequest TypeRequiredData Typeschema
codeTypeSMS type (1-Password reset 2-Login 3-Registration 4-Account cancellation 5-Add push recipient)querytrueinteger(int32)
internationalCodeInternational codequerytruestring
phonePhone numberquerytruestring
randomRandom string, fixed length of 16 charactersquerytruestring
signatureSignature
Generation rule: SHA256(phone + codeType + random + ts + userDomainSecret)
After SHA256 encoding, the data uses HEX_ENCODE format.
Example:
phone: 13800138000
codeType: 3
random: 76a6L647F02CAoN9
ts: 1744773894369
userDomainSecret: 57Fk69oYgbs2aWWN362NtZwYB2RqKNqQ7yZESnF5VM33
Signature format:
SHA256(13800138000376a6L647F02CAoN9174477389436957Fk69oYgbs2aWWN362NtZwYB2RqKNqQ7yZESnF5VM33)
Calculated signature:
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
querytruestring
tsCurrent millisecond timestamp, cannot differ from server time by more than 10 minutesquerytrueinteger(int64)
userDomainUser domainquerytruestring

Response Status:

Status CodeDescriptionschema
200Mobile SMS verification code sent successfullyRegistration code response data
5019Phone number format incorrect
5021Please enter phone number
5023Please enter user domain
5058SMS sending exceeds frequency limit
5059SMS sending exception
5116Please enter international code
5117Please enter enterprise SMS signature ID
5118Please enter enterprise SMS template ID
5122No permission to use this enterprise SMS signature ID
5123Enterprise SMS signature ID has been disabled
5124No permission to use this enterprise SMS template ID
5125Enterprise SMS template ID has been disabled
5126SMS signature and template not under the same SMS account
5128Enterprise SMS account has been disabled
5188Enterprise SMS account does not exist
5202Enterprise SMS signature does not exist
5209Enterprise SMS template does not exist
5216Signature ID and template ID types must be consistent

Response Parameters:

Parameter NameParameter DescriptionTypeschema
codeResponse status codeinteger(int32)integer(int32)
dataResponse dataobject
extMsgExtended messagestring
msgResponse messagestring

Response Example:

javascript
{
	"code": 0,
	"data": {},
	"extMsg": "",
	"msg": ""
}