When I’m trying to create a group and then add 20+ members to it sometimes I get unknown error. It happens time to time, not always. Have someone faced this problem also?
By the way. Is there a limitation for group size in cometchat?
Hi @AKorpusenko,
Could you please let us know what issue you are facing while trying to add 20+ members in a group?
Regarding your second question, The limit for group size is 300.
Warm Regards,
Siva
CometChat Team
Hi @AKorpusenko,
Here is code snippet below for adding 22 members in a group and it is working perfectly fine.
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api-eu.cometchat.io/v2.0/groups/grouptest/members",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS =>"{\n\t\t\"participants\":[\"superhero21\", \"superhero22\",\"superhero23\",\"superhero24\",\"superhero25\",\"superhero26\",\"superhero27\",\"superhero28\",\"superhero29\",\"superhero30\",\"superhero31\",\"superhero32\",\"superhero33\",\"superhero34\",\"superhero35\",\"superhero36\",\"superhero37\",\"superhero38\",\"superhero39\", \"superhero40\", \"superhero41\", \"superhero42\"]\n}",
CURLOPT_HTTPHEADER => array(
"appId: 1291XXXXXXX",
"apiKey: cf53XXXXXX",
"Content-Type: application/json",
"Accept: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
1 Like
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.