Documentation - v0.27.1
    Preparing search index...
    • Authorize a user in Telegram with a valid confirmation code.

      Parameters

      • client: ITelegramClient
      • params: {
            abortSignal?: AbortSignal;
            phone: string;
            phoneCode: string;
            phoneCodeHash: string;
        }
        • OptionalabortSignal?: AbortSignal

          Abort signal

        • phone: string

          Phone number in international format

        • phoneCode: string

          The confirmation code that was received

        • phoneCodeHash: string

          Code identifier from sendCode

      Returns Promise<User>

      If the code was valid and authorization succeeded, the User is returned.

      BadRequestError In case the arguments are invalid

      SessionPasswordNeededError In case a password is needed to sign in