Skip to content

setAuthenticationPhoneNumber

Function · TDLib 1.8.67 · d1085f9c

Sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitPremiumPurchase, authorizationStateWaitEmailAddress, authorizationStateWaitEmailCode, authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword

setAuthenticationPhoneNumber(
  phone_number: string,
  settings: PhoneNumberAuthenticationSettings
) → Ok

phone_number

string

The phone number of the user, in international format

settings

PhoneNumberAuthenticationSettings

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