Skip to content

sendPhoneNumberCode

Function · TDLib 1.8.67 · d1085f9c

Sends a code to the specified phone number. Aborts previous phone number verification if there was one. On success, returns information about the sent code

sendPhoneNumberCode(
  phone_number: string,
  settings: PhoneNumberAuthenticationSettings,
  type: PhoneNumberCodeType
) → AuthenticationCodeInfo

phone_number

string

The phone number, in international format

settings

PhoneNumberAuthenticationSettings

Settings for the authentication of the user's phone number; pass null to use default settings

type

PhoneNumberCodeType

Type of the request for which the code is sent