phone.confirmCall

Complete phone call E2E encryption key exchange »

Example

const {Api, TelegramClient} = require('telegram');
const {StringSession} = require('telegram/sessions');

const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});

(async function run() {
    const result = await client.invoke(new Api.phone.confirmCall({
        peer: new Api.InputPhoneCall({...}),
        gA: Buffer.from('some bytes here'),
        keyFingerprint: 8851789,
        protocol: new Api.PhoneCallProtocol({...}),
        }));
    console.log(result); // prints the result
})();

TL schema

phone.phoneCall#ec82e140 phone_call:PhoneCall users:Vector<User> = phone.PhoneCall;
---functions---
phone.confirmCall#2efe1722 peer:InputPhoneCall g_a:bytes key_fingerprint:long protocol:PhoneCallProtocol = phone.PhoneCall;

Parameters

Name

Type

Description

peer

The phone call

g_a

key_fingerprint

Key fingerprint

protocol

Phone call settings

Result

phone.PhoneCall

Possible errors

Code

Type

Description

400

CALL_ALREADY_DECLINED

The call was already declined

400

CALL_PEER_INVALID

The provided call peer object is invalid

Can bots use this methd ?

yes

Last updated