Skip to main content

phone.joinGroupCall

Join a group call, see here » for the full flow.

func (c *Client) PhoneJoinGroupCall(ctx context.Context, request *PhoneJoinGroupCallRequest) (UpdatesClass, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.PhoneJoinGroupCall(ctx, &tg.PhoneJoinGroupCallRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})

Parameters

NameTypeRequiredDescription
MutedboolIf set, the user will be muted by default upon joining.
VideoStoppedboolIf set, the user's video will be disabled by default upon joining.
CallInputGroupCallClassyesThe group call
JoinAsInputPeerClassyesJoin the group call, presenting yourself as the specified user/channel
InviteHashstringThe invitation hash from the invite link », if provided allows speaking in a livestream or muted group chat.
PublicKeybin.Int256For conference calls, your public key.
Block[]byteThe block containing an appropriate e2e.chain.changeSetGroupState event.
ParamsDataJSONyesWebRTC parameters

Returns

UpdatesClass

Possible errors

CodeTypeDescription
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
403CHAT_WRITE_FORBIDDENYou can't write in this chat.
400DATA_JSON_INVALIDThe provided JSON data is invalid.
500GROUPCALL_ADD_PARTICIPANTS_FAILED
403GROUPCALL_FORBIDDENThe group call has already ended.
400GROUPCALL_INVALIDThe specified group call is invalid.
400GROUPCALL_SSRC_DUPLICATE_MUCHThe app needs to retry joining the group call with a new SSRC value.
400JOIN_AS_PEER_INVALIDThe specified peer cannot be used to join a group call.

References