Send Verification Code

send a sms with six-digit code


URI: /2fa/sendCode

Request Type:POST

Content Type:application/json


Parameter Data Type Required Description Example
phoneNumber String required the number of phone to send sms +8613118101234
timeout Integer optional expired timeout for generated code - time-unit: second, default: 120 300
{"phoneNumber": "1234567890", "timeout": 300}

Request Sample

curl --request POST \
  --url \
  --header 'content-type: application/json' \
  --data '{
    "phoneNumber": "1234567890",
    "timeout": 300



Field Data Type Description Example
message String error message "phone number is blank"
token String the identification of client's session "abcdefgh"
isSuccessful boolean whether the sms was successfully sent or not true/false

Response Sample

  • success

    {"message":"", "token":"abcdefgh", "isSuccessful": true}
    • fail
    {"message":"phone number is blank", "token":"", "isSuccessful": false}

results matching ""

    No results matching ""