Create a Group

Groups is the simplest way to chat with multiple user at any given time.

Create Group#

To create a new group use below method. Once the request is made successfully, an groupProfileListener and messageListener callback will be triggered. Response will be of two types, one is for successfull adding of participant with both party details and other one is for group profile udpate.

await SDK.createGroup(`GROUP_NAME`, [`USER_JID`], `GROUP_IMAGE`);

Request Params#

StatusDescriptionTypeRequired
GROUP_NAMEGroup NameStringtrue
USER_JIDArray of User JID (size cannot be less than 2 excluding group creator)JID Stringtrue
GROUP_IMAGEProfile Image - Upload an image file or image URLFile / Stringfalse

Example Response#

{
statusCode: 200,
message: "Success",
data: {
groupId: "0f617991-08d0-4474-ae6c-f070dc63bb1a"
groupJid: "0f617991-08d0-4474-ae6c-f070dc63bb1a@mix.xmppdomain"
}
}