Class TdApi.SetAuthenticationPhoneNumber

  • Enclosing class:
    TdApi

    public static class TdApi.SetAuthenticationPhoneNumber
    extends TdApi.Function
    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.

    Returns Ok

    • Field Detail

      • phoneNumber

        public String phoneNumber
        The phone number of the user, in international format.
      • CONSTRUCTOR

        public static final int CONSTRUCTOR
        Identifier uniquely determining type of the object.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SetAuthenticationPhoneNumber

        public SetAuthenticationPhoneNumber()
        Default constructor for a 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.

        Returns Ok

      • SetAuthenticationPhoneNumber

        public SetAuthenticationPhoneNumber​(String phoneNumber,
                                            TdApi.PhoneNumberAuthenticationSettings settings)
        Creates a 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.

        Returns Ok

        Parameters:
        phoneNumber - The phone number of the user, in international format.
        settings - Settings for the authentication of the user's phone number; pass null to use default settings.