curl --request POST \
--url https://{appid}.api-{region}.cometchat.io/v3/data_import/members \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"members": {
"guid1_member_uid2": {
"memberId": "guid1_member_uid2",
"uid": "uid2",
"guid": "guid1",
"joinedAt": "1673421419",
"scope": "admin",
"groupDetails": {
"guid": "guid1",
"name": "guid1",
"type": "public",
"owner": "uid1",
"createdAt": "1673421419"
},
"userDetails": {
"uid": "uid2",
"name": "uid2"
}
}
}
}
'{
"data": {
"guid1_member_uid2": {
"success": true,
"data": {
"guid": "guid1",
"uid": "uid2",
"scope": "admin",
"joinedAt": 1673421419
}
}
}
}The CometChat group member import API allows customers to import their group members’ data into the CometChat systems.
curl --request POST \
--url https://{appid}.api-{region}.cometchat.io/v3/data_import/members \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"members": {
"guid1_member_uid2": {
"memberId": "guid1_member_uid2",
"uid": "uid2",
"guid": "guid1",
"joinedAt": "1673421419",
"scope": "admin",
"groupDetails": {
"guid": "guid1",
"name": "guid1",
"type": "public",
"owner": "uid1",
"createdAt": "1673421419"
},
"userDetails": {
"uid": "uid2",
"name": "uid2"
}
}
}
}
'{
"data": {
"guid1_member_uid2": {
"success": true,
"data": {
"guid": "guid1",
"uid": "uid2",
"scope": "admin",
"joinedAt": 1673421419
}
}
}
}API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).
Wrapper for the members.
Show child attributes
Wraps a single member object. The <guid>_member_<uid> will will be a primary key/unique Identifier of the member.
Show child attributes
The value should be the same as value of the placeholder <guid>_member_<uid> which wraps the member object.
Id of the group.
Id of user.
Scope of the member in group.
Specify if user is banned in group.
A 10-digit UNIX timestamp at which the member joined the group.
The JSON object contains the group details of the member.
Show child attributes
The primary-key/ unique identifier of the group.
Name of the group.
Type of the group. Can be public, password or private.
public, password, private An URL for a group icon.
A password required to join the the group with type password
Owner of the group.
A 10-digit UNIX timestamp at which the group was created.
Additional data for the group.
A string array containing grouptags.
The JSON object contains the user details of the member.
Show child attributes
The primary-key/ unique identifier of the member.
Name of the member.
URL to the profile picture of the member.
Profile page URL of the user.
Role of the user. Should be created already via the Create role API.
A 10-digit timestamp at which the member was created.
A 10-digit UNIX timestamp at which the member was most recently online.
JSON object containing Additional member information.
A string array containing member tags.
A 10-digit UNIX timestamp at which the member was deactivated/soft-deleted/blocked to use the chat services.
{
"guid1_member_uid2": {
"memberId": "guid1_member_uid2",
"uid": "uid2",
"guid": "guid1",
"joinedAt": "1673421419",
"scope": "admin",
"groupDetails": {
"guid": "guid1",
"name": "guid1",
"type": "public",
"owner": "uid1",
"createdAt": "1673421419"
},
"userDetails": { "uid": "uid2", "name": "uid2" }
}
}
Import Group Member(s)
Show child attributes
Response data
Show child attributes
Was this page helpful?