Skip to content

setAuthPhoneNumber

Naji edited this page Sep 4, 2017 · 2 revisions

Sets user's phone number and sends authentication code to the user.

setAuthPhoneNumber(phone_number, allow_flash_call, is_current_phone_number)
Option Description
phone_number User's phone number
allow_flash_call Pass True if code can be sent via flash call to the specified phone number
is_current_phone_number Pass true if the phone number is used on the current device. Ignored if allow_flash_call is False

Works only when getAuthState returns authStateWaitPhoneNumber. If phone number is not recognized or another error has happened, returns an error. Otherwise returns authStateWaitCode

Clone this wiki locally