Skip to content
Identity Verification

Send SMS Verification Code

Sends an SMS or voice verification code to the Client's phone number for account security flows that require phone verification. Complete human verification first: call GET /v2/auth/captcha to get the configuration, complete verification with Tencent Cloud Captcha or Google reCAPTCHA Enterprise, and put the result in captcha.

After the code is sent, ask the Client to enter it, then call POST /v1/member/check_mobile with the same type to check it and obtain verify_credentials.

Features that use this operation:

  • Account › Trade password › Reset trade password (reset_trade_password): call POST /v2/member/trade/reset_password with the credential
  • Account › Trade password › Set trade password (set_trade_password): call POST /v2/member/trade/set_password with the credential
  • Trade › Trade unlock › SMS two-factor verification (trade_auth_2fa): after the check, call POST /v1/member/trade/auth_two_factors
  • Account › Security settings › Turn the token on or off (totp): call POST /v1/account/totp/setting with the credential
  • Account › Contact details › Change phone number, change email (change_mobile, change_email)
  • Account › Close account (identity_verify)
  • Account opening contact verification and account-opening information changes, as well as phone login and login password recovery before sign-in, also use this operation, but those flows are outside TradingAPI

401043 means human verification failed: complete human verification again before resending. If you used Google reCAPTCHA Enterprise, you can retry with Tencent Cloud Captcha. For other failures, show message.

When you call this operation through WhaleCore requestService(), you do not need to set requiresTradeToken to true.

POSThttps://api.lbkrs.com/v1/auth/send_code

Request body application/json

captchaobjectrequired

Human verification result. Send only the field for the verification provider used in this attempt. When the provider's switch field in the human verification configuration (tencent_switch or google_switch) is true, the server has turned off human verification for that provider; send an empty object for it, such as {"tencent": {}}.

Child attributes
tencentobject

Result from Tencent Cloud Captcha

Child attributes
ticketstring

The ticket returned after successful verification

rand_strstring

The random string randstr returned after successful verification

tencent_idstring

Captcha AppId used for this attempt, taken from tencent_ids in the human verification configuration

sidstring

The session ID sid returned after successful verification

googleobject

Result from Google reCAPTCHA Enterprise

Child attributes
tokenstring

Token returned by the verification

actionstring

Action passed when running the verification. It is the same as type in the request

site_keystring

Decrypted site key, which is the plaintext of google_key in the human verification configuration

country_codestringrequired

International dialing code of the phone number, without +, such as 852

mobilestringrequired

Client's phone number without the dialing code. You can take it from member.mobile returned by “Get User Information”

send_typestringrequired

Delivery method:

  • sms - SMS
  • voice - Voice call
Values
sms
voice
typestringrequired

Purpose of the code. Send the same value when sending and checking the same code:

  • reset_trade_password - Reset the trade password
  • set_trade_password - Set the trade password
  • trade_auth_2fa - SMS two-factor verification for trade unlock
  • totp - Verify the phone before turning the token on or off
  • change_mobile - Verify the current phone before changing the phone number
  • change_email - Verify the phone before changing the email
  • identity_verify - Verify identity before closing the account

Responses

HTTP 200The request succeeded. The response body contains the result of the “Send SMS Verification Code” operation.
Standard response envelopecodemessagedata
dataobjectdata structure

No business fields

No nested fields

Whale Docs