curl --request GET \
--url https://{appid}.api-{region}.cometchat.io/v3/groups/{guid}/members \
--header 'apikey: <api-key>'
{
"data": [
{
"uid": "superhero2",
"name": "Captain America",
"avatar": "https://data-us.cometchat.io/assets/images/avatars/captainamerica.png",
"status": "offline",
"role": "default",
"scope": "participant",
"joinedAt": 1638360106,
"createdAt": 1629869270,
"updatedAt": 1630308676,
"conversationId": "superhero2_user_superhero4"
},
{
"uid": "superhero3",
"name": "Captain America",
"link": "https://data-us.cometchat.io/assets",
"avatar": "https://data-us.cometchat.io/assets/images/avatars/captainamerica.png",
"metadata": {
"contactNumber": "0123456789"
},
"status": "offline",
"role": "default",
"scope": "participant",
"joinedAt": 1638360106,
"createdAt": 1629869270,
"updatedAt": 1638351060,
"conversationId": "superhero3_user_superhero4"
},
{
"uid": "superhero5",
"name": "Cyclops",
"avatar": "https://data-us.cometchat.io/assets/images/avatars/cyclops.png",
"status": "offline",
"role": "default",
"scope": "moderator",
"joinedAt": 1638360106,
"createdAt": 1629869270,
"conversationId": "superhero4_user_superhero5"
},
{
"uid": "superhero4",
"name": "Wolverine",
"avatar": "https://data-us.cometchat.io/assets/images/avatars/wolverine.png",
"status": "offline",
"role": "default",
"scope": "admin",
"joinedAt": 1638359534,
"createdAt": 1629869270
}
],
"meta": {
"pagination": {
"total": 0,
"count": 5,
"per_page": 100,
"current_page": 1,
"total_pages": 1
}
},
"cursor": {
"updatedAt": 1638354799,
"affix": "prepend"
}
}
List the members of a group for a given GUID
curl --request GET \
--url https://{appid}.api-{region}.cometchat.io/v3/groups/{guid}/members \
--header 'apikey: <api-key>'
{
"data": [
{
"uid": "superhero2",
"name": "Captain America",
"avatar": "https://data-us.cometchat.io/assets/images/avatars/captainamerica.png",
"status": "offline",
"role": "default",
"scope": "participant",
"joinedAt": 1638360106,
"createdAt": 1629869270,
"updatedAt": 1630308676,
"conversationId": "superhero2_user_superhero4"
},
{
"uid": "superhero3",
"name": "Captain America",
"link": "https://data-us.cometchat.io/assets",
"avatar": "https://data-us.cometchat.io/assets/images/avatars/captainamerica.png",
"metadata": {
"contactNumber": "0123456789"
},
"status": "offline",
"role": "default",
"scope": "participant",
"joinedAt": 1638360106,
"createdAt": 1629869270,
"updatedAt": 1638351060,
"conversationId": "superhero3_user_superhero4"
},
{
"uid": "superhero5",
"name": "Cyclops",
"avatar": "https://data-us.cometchat.io/assets/images/avatars/cyclops.png",
"status": "offline",
"role": "default",
"scope": "moderator",
"joinedAt": 1638360106,
"createdAt": 1629869270,
"conversationId": "superhero4_user_superhero5"
},
{
"uid": "superhero4",
"name": "Wolverine",
"avatar": "https://data-us.cometchat.io/assets/images/avatars/wolverine.png",
"status": "offline",
"role": "default",
"scope": "admin",
"joinedAt": 1638359534,
"createdAt": 1629869270
}
],
"meta": {
"pagination": {
"total": 0,
"count": 5,
"per_page": 100,
"current_page": 1,
"total_pages": 1
}
},
"cursor": {
"updatedAt": 1638354799,
"affix": "prepend"
}
}
API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).
A GUID of a group.
Number of users to be fetched in a request. The default value is 100 and the maximum value is 1000.
Group members list can be fetched depending on the user status. (available,offline).
available
, offline
Page Number.
Fetches group members based on multiple scope.
Create Group Members
The response is of type object
.
Was this page helpful?