libtd-ktx / kotlinx.telegram.coroutines / setAuthenticationPhoneNumber
setAuthenticationPhoneNumber
suspend fun
TelegramFlow
.setAuthenticationPhoneNumber(phoneNumber:
String
?, settings:
PhoneNumberAuthenticationSettings
?):
Unit
Suspend function, which 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 authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword.
Parameters
phoneNumber
- The phone number of the user, in international format.
settings
- Settings for the authentication of the user’s phone number.