curl --request GET \
--url https://{appid}.api-{region}.cometchat.io/v3/users/{uid}/blockedusers \
--header 'apikey: <api-key>'
{
"data": [
{
"uid": "superhero6",
"name": "Barry Allen",
"link": "http://placehold.it",
"avatar": "http://placehold.it/120x120&text=image1",
"metadata": {
"rawMetadata": "{'gender':'Male'}"
},
"status": "offline",
"role": "manager",
"blockedByMe": true,
"blockedByMeAt": 1638346853,
"blockedAt": 1638346853,
"createdAt": 1629869270,
"updatedAt": 1638351060,
"conversationId": "superhero3_user_superhero4"
},
{
"uid": "superhero2",
"name": "Captain America",
"link": "http://placehold.it",
"avatar": "http://placehold.it/120x120&text=image1",
"metadata": {
"rawMetadata": "{'gender':'Male'}"
},
"status": "offline",
"role": "manager",
"blockedByMe": true,
"blockedByMeAt": 1638346853,
"blockedAt": 1638346853,
"createdAt": 1629869270,
"updatedAt": 1638351060,
"conversationId": "superhero1_user_superhero2"
}
],
"meta": {
"pagination": {
"total": 0,
"count": 5,
"per_page": 100,
"current_page": 1,
"total_pages": 1
},
"cursor": {
"updatedAt": 1638354799,
"affix": "prepend"
}
}
}
Retrieves the blocked users
curl --request GET \
--url https://{appid}.api-{region}.cometchat.io/v3/users/{uid}/blockedusers \
--header 'apikey: <api-key>'
{
"data": [
{
"uid": "superhero6",
"name": "Barry Allen",
"link": "http://placehold.it",
"avatar": "http://placehold.it/120x120&text=image1",
"metadata": {
"rawMetadata": "{'gender':'Male'}"
},
"status": "offline",
"role": "manager",
"blockedByMe": true,
"blockedByMeAt": 1638346853,
"blockedAt": 1638346853,
"createdAt": 1629869270,
"updatedAt": 1638351060,
"conversationId": "superhero3_user_superhero4"
},
{
"uid": "superhero2",
"name": "Captain America",
"link": "http://placehold.it",
"avatar": "http://placehold.it/120x120&text=image1",
"metadata": {
"rawMetadata": "{'gender':'Male'}"
},
"status": "offline",
"role": "manager",
"blockedByMe": true,
"blockedByMeAt": 1638346853,
"blockedAt": 1638346853,
"createdAt": 1629869270,
"updatedAt": 1638351060,
"conversationId": "superhero1_user_superhero2"
}
],
"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).
An UID of a user.
Blocked user
The response is of type object
.
Was this page helpful?