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_JIDThe array of user JIDs must contain at least 2 members, not including the logged in user.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"
}
}