Layer 227
method Users
phone.requestCall#42ff96ed flags:# video:flags.0?true user_id:InputUser random_id:int g_a_hash:bytes protocol:PhoneCallProtocol = phone.PhoneCall;

Parameters

Name Type Description
Video flags .0? true Whether to start a video call
UserId InputUser Destination of the phone call
RandomId int Random ID to avoid resending the same object
GAHash bytes Parameter for E 2 E encryption key exchange
Protocol PhoneCallProtocol Phone call settings

Returns

phone.PhoneCall

Gogram Example

// PhoneRequestCall - positional arguments
result, err := client.PhoneRequestCall(nil, &tg.InputUserSelf{}, 42, []byte{0x01, 0x02, 0x03}, &tg.PhoneCallProtocol{})
if err != nil {
    // handle error
}
// result is *tg.PhonePhoneCall

Possible Errors

Code Type Description
400 CALL_PROTOCOL_FLAGS_INVALID Call protocol flags invalid.
400 CALL_PROTOCOL_LAYER_INVALID The specified protocol layer version range is invalid.
400 INPUT_USER_DEACTIVATED The specified user was deleted.
400 PARTICIPANT_VERSION_OUTDATED The other participant does not use an up to date telegram client with support for calls.
500 RANDOM_ID_DUPLICATE You provided a random ID that was already used.
400 USER_ID_INVALID The provided user ID is invalid.
403 USER_IS_BLOCKED You were blocked by this user.
403 USER_PRIVACY_RESTRICTED The user's privacy settings do not allow you to do this.