채널 사용자 관리

Get Channel Members

GET https://api.talkplus.io/v1.4/api/channels/:channelId/members

Path Parameters

NameTypeDescription

channelId*

string

Query Parameters

NameTypeDescription

lastUserId

string

Last member user ID to query from (use for pagination)

limit

integer

default: 50

Headers

NameTypeDescription

app-id*

string

App ID

api-key*

string

App API key

{
  "members": [
    {
      "id": "user123",
      "username": "john",
      "profileImageUrl": "http://cnd.test.com/123.jpg",
      "data": {},
      "memberInfo": {},
      "lastReadAt": 1583924400,
      "lastSentAt": 1583924400,
      "updatedAt": 1583924400,
      "createdAt": 1583921400
    }
  ],
  "hasNext": false
}

Get Channel Member

GET https://api.talkplus.io/v1.4/api/channels/:channelId/members/:memberId

Path Parameters

NameTypeDescription

channelId*

string

memberId*

string

Headers

NameTypeDescription

app-id*

string

App ID

api-key*

string

App API key

{
  "member": {
      "id": "user123",
      "username": "john",
      "profileImageUrl": "http://cnd.test.com/123.jpg",
      "data": {},
      "memberInfo": {},
      "lastReadAt": 1583924400,
      "lastSentAt": 1583924400,
      "updatedAt": 1583924400,
      "createdAt": 1583921400
    }
}

Add Channel Members

POST https://api.talkplus.io/v1.4/api/channels/:channelId/members/add

Path Parameters

NameTypeDescription

channelId*

string

Headers

NameTypeDescription

content-type

string

application/json

app-id*

string

App ID

api-key*

string

App API key

Request Body

NameTypeDescription

members*

array

채널 멤버로 추가할 사용자 ID 목록

{
  "channel": {
    "id": "channel123",
    "name": "MyFirstChannel",
    "ownerId": "user123",
    "type": "private",
    "imageUrl": "image url",
    "invitationCode": "",
    "isFrozen": false,
    "hideMessagesBeforeJoin": false,
    "category": "",
    "subcategory": "",
    "privateTag": "",
    "privateData": "",
    "memberCount": 2,
    "maxMemberCount": 100,
    "data": {
      "someMetaKey1": "someMetaValue1",
      "someMetaKey2": "someMetaValue2"
    },
    "members": [
      {
        "id": "user123",
        "username": "john",
        "profileImageUrl": "http://cnd.test.com/123.jpg",
        "data": {},
        "memberInfo": {},
        "lastReadAt": 1583924400,
        "lastSentAt": 1583924400,
        "updatedAt": 1583924400,
        "createdAt": 1583921400
      },
      {
        "id": "user456",
        "username": "james",
        "profileImageUrl": "http://cnd.test.com/456.jpg",
        "data": {},
        "memberInfo": {},
        "lastReadAt": 1583924400,
        "lastSentAt": 1583924400,
        "updatedAt": 1583924400,
        "createdAt": 1583921400
      }
    ],
    "mutedUsers": [],
    "bannedUsers": [],
    "updatedAt": 1583924400,
    "createdAt": 1583921400,
    "unreadCount": 0,
    "lastReadAt": 0,
    "lastMessage": {
      "id": "sdf2l5s9j",
      "channelId": "channel123",
      "userId": "user456",
      "username": "myUsername",
      "profileImageUrl": "http://cdn.test.com/123.jpg",
      "type": "message",
      "text": "Hello world",
      "data": {
        "customField": "customData"
      },
      "parentMessage": {},
      "translations": {},
      "reactions": {"happy": 1},
      "ownReactions": [],
      "createdAt": 1583921400
    }
  }
}

Remove Channel Members

POST https://api.talkplus.io/v1.4/api/channels/:channelId/members/remove

Path Parameters

NameTypeDescription

channelId*

string

Headers

NameTypeDescription

content-type

string

application/json

app-id*

string

App ID

api-key*

string

App API key

Request Body

NameTypeDescription

members*

array

채널 멤버 목록에서 제거할 사용자 ID 목록

{
  "channel": {
    "id": "channel123",
    "name": "MyFirstChannel",
    "ownerId": "user123",
    "type": "private",
    "imageUrl": "image url",
    "invitationCode": "",
    "isFrozen": false,
    "hideMessagesBeforeJoin": false,
    "category": "",
    "subcategory": "",
    "privateTag": "",
    "privateData": "",
    "memberCount": 2,
    "maxMemberCount": 100,
    "data": {
      "someMetaKey1": "someMetaValue1",
      "someMetaKey2": "someMetaValue2"
    },
    "members": [
      {
        "id": "user123",
        "username": "john",
        "profileImageUrl": "http://cnd.test.com/123.jpg",
        "data": {},
        "memberInfo": {},
        "lastReadAt": 1583924400,
        "lastSentAt": 1583924400,
        "updatedAt": 1583924400,
        "createdAt": 1583921400
      },
      {
        "id": "user456",
        "username": "james",
        "profileImageUrl": "http://cnd.test.com/456.jpg",
        "data": {},
        "memberInfo": {},
        "lastReadAt": 1583924400,
        "lastSentAt": 1583924400,
        "updatedAt": 1583924400,
        "createdAt": 1583921400
      }
    ],
    "mutedUsers": [],
    "bannedUsers": [],
    "updatedAt": 1583924400,
    "createdAt": 1583921400,
    "unreadCount": 0,
    "lastReadAt": 0,
    "lastMessage": {
      "id": "sdf2l5s9j",
      "channelId": "channel123",
      "userId": "user456",
      "username": "myUsername",
      "profileImageUrl": "http://cdn.test.com/123.jpg",
      "type": "message",
      "text": "Hello world",
      "data": {
        "customField": "customData"
      },
      "parentMessage": {},
      "translations": {},
      "reactions": {"happy": 1},
      "ownReactions": [],
      "createdAt": 1583921400
    }
  }
}

Get Users Banned from Channel

GET https://api.talkplus.io/v1.4/api/channels/:channelId/members/banned

Path Parameters

NameTypeDescription

channelId*

string

Query Parameters

NameTypeDescription

lastUserId

string

Last user ID to query from (use for pagination)

limit

integer

default: 50

Headers

NameTypeDescription

app-id*

string

App ID

api-key*

string

App API key

{
  "users": [
    {
      "id": "user123",
      "username": "john",
      "profileImageUrl": "http://cnd.test.com/123.jpg",
      "data": {},
      "memberInfo": {},
      "lastReadAt": 1583924400,
      "lastSentAt": 1583924400,
      "updatedAt": 1583924400,
      "createdAt": 1583921400
    }
  ],
  "hasNext": false
}

Ban Channel Members

POST https://api.talkplus.io/v1.4/api/channels/:channelId/members/ban

Path Parameters

NameTypeDescription

channelId*

string

Headers

NameTypeDescription

content-type

string

application/json

app-id*

string

App ID

api-key*

string

App API key

Request Body

NameTypeDescription

members*

array

채널에서 차단할 사용자 ID 목록

{
  "channel": {
    "id": "channel123",
    "name": "MyFirstChannel",
    "ownerId": "user123",
    "type": "private",
    "imageUrl": "image url",
    "invitationCode": "",
    "isFrozen": false,
    "hideMessagesBeforeJoin": false,
    "category": "",
    "subcategory": "",
    "privateTag": "",
    "privateData": "",
    "memberCount": 2,
    "maxMemberCount": 100,
    "data": {
      "someMetaKey1": "someMetaValue1",
      "someMetaKey2": "someMetaValue2"
    },
    "members": [
      {
        "id": "user123",
        "username": "john",
        "profileImageUrl": "http://cnd.test.com/123.jpg",
        "data": {},
        "memberInfo": {},
        "lastReadAt": 1583924400,
        "lastSentAt": 1583924400,
        "updatedAt": 1583924400,
        "createdAt": 1583921400
      }
      {
        "id": "user456",
        "username": "james",
        "profileImageUrl": "http://cnd.test.com/456.jpg",
        "data": {},
        "memberInfo": {},
        "lastReadAt": 1583924400,
        "lastSentAt": 1583924400,
        "updatedAt": 1583924400,
        "createdAt": 1583921400
      }
    ],
    "mutedUsers": [],
    "bannedUsers": [
      {
        "id": "user456",
        "username": "james",
        "profileImageUrl": "http://cnd.test.com/456.jpg",
        "data": {},
        "memberInfo": {},
        "lastReadAt": 1583924400,
        "lastSentAt": 1583924400,
        "updatedAt": 1583924400,
        "createdAt": 1583921400
      }
    ],
    "updatedAt": 1583924400,
    "createdAt": 1583921400,
    "unreadCount": 0,
    "lastReadAt": 0,
    "lastMessage": {
      "id": "sdf2l5s9j",
      "channelId": "channel123",
      "userId": "user456",
      "username": "myUsername",
      "profileImageUrl": "http://cdn.test.com/123.jpg",
      "type": "message",
      "text": "Hello world",
      "data": {
        "customField": "customData"
      },
      "parentMessage": {},
      "translations": {},
      "reactions": {"happy": 1},
      "ownReactions": [],
      "createdAt": 1583921400
    }
  }
}

Unban Users from Channel

POST https://api.talkplus.io/v1.4/api/channels/:channelId/members/unban

Path Parameters

NameTypeDescription

channelId*

string

Headers

NameTypeDescription

content-type

string

application/json

app-id*

string

App ID

api-key*

string

App API key

Request Body

NameTypeDescription

members*

array

채널 차단 해지할 사용자 ID 목록

{
  "channel": {
    "id": "channel123",
    "name": "MyFirstChannel",
    "ownerId": "user123",
    "type": "private",
    "imageUrl": "image url",
    "invitationCode": "",
    "isFrozen": false,
    "hideMessagesBeforeJoin": false,
    "category": "", 
    "subcategory": "",
    "privateTag": "",
     "privateData": "",
    "memberCount": 2,
    "maxMemberCount": 100,
    "data": {
      "someMetaKey1": "someMetaValue1",
      "someMetaKey2": "someMetaValue2"
    },
    "members": [
      {
        "id": "user123",
        "username": "john",
        "profileImageUrl": "http://cnd.test.com/123.jpg",
        "data": {},
        "memberInfo": {},
        "lastReadAt": 1583924400,
        "lastSentAt": 1583924400,
        "updatedAt": 1583924400,
        "createdAt": 1583921400
      },
      {
        "id": "user456",
        "username": "james",
        "profileImageUrl": "http://cnd.test.com/456.jpg",
        "data": {},
        "memberInfo": {},
        "lastReadAt": 1583924400,
        "lastSentAt": 1583924400,
        "updatedAt": 1583924400,
        "createdAt": 1583921400
      }
    ],
    "mutedUsers": [],
    "bannedUsers": [],
    "updatedAt": 1583924400,
    "createdAt": 1583921400,
    "unreadCount": 0,
    "lastReadAt": 0,
    "lastMessage": {
      "id": "sdf2l5s9j",
      "channelId": "channel123",
      "userId": "user456",
      "username": "myUsername",
      "profileImageUrl": "http://cdn.test.com/123.jpg",
      "type": "message",
      "text": "Hello world",
      "data": {
        "customField": "customData"
      },
      "parentMessage": {},
      "translations": {},
      "reactions": {"happy": 1},
      "ownReactions": [],
      "createdAt": 1583921400
    }
  }
}

Get Muted Channel Members

GET /v1.4/api/channels/:channelId/members/muted

Path Parameters

NameTypeDescription

channelId*

string

Query Parameters

NameTypeDescription

lastUserId

string

Last member user ID to query from (use for pagination)

limit

integer

default: 50

Headers

NameTypeDescription

app-id*

string

App ID

api-key*

string

App API key

{
  "members": [
    {
      "id": "user123",
      "username": "john",
      "profileImageUrl": "http://cnd.test.com/123.jpg",
      "data": {},
      "memberInfo": {},
      "lastReadAt": 1583924400,
      "lastSentAt": 1583924400,
      "updatedAt": 1583924400,
      "createdAt": 1583921400
    }
  ],
  "hasNext": false
}

Mute Channel Members

POST https://api.talkplus.io/v1.4/api/channels/:channelId/members/mute

Path Parameters

NameTypeDescription

channelId*

string

Headers

NameTypeDescription

content-type

string

application/json

app-id*

string

App ID

api-key*

string

App API key

Request Body

NameTypeDescription

members*

array

채널에서 mute 처리할 사용자 ID 목록

expireInMinutes

int

expireInMinutes 옵션을 사용하면 mute가 N분 후에 자동 해제되도록 지정할 수 있습니다.

expireInMinutes의 기본값은 0입니다 (자동 해제 없음)

{
  "channel": {
    "id": "channel123",
    "name": "MyFirstChannel",
    "ownerId": "user123",
    "type": "private",
    "imageUrl": "image url",
    "invitationCode": "",
    "isFrozen": false,
    "hideMessagesBeforeJoin": false,
    "category": "", 
    "subcategory": "",
    "privateTag": "",
    "privateData": "",
    "memberCount": 1,
    "maxMemberCount": 100,
    "data": {
      "someMetaKey1": "someMetaValue1",
      "someMetaKey2": "someMetaValue2"
    },
    "members": [
      {
        "id": "user123",
        "username": "john",
        "profileImageUrl": "http://cnd.test.com/123.jpg",
        "data": {},
        "memberInfo": {},
        "lastReadAt": 1583924400,
        "lastSentAt": 1583924400,
        "updatedAt": 1583924400,
        "createdAt": 1583921400
      },
      {
        "id": "user456",
        "username": "john",
        "profileImageUrl": "http://cnd.test.com/456.jpg",
        "data": {},
        "memberInfo": {},
        "lastReadAt": 1583924400,
        "lastSentAt": 1583924400,
        "updatedAt": 1583924400,
        "createdAt": 1583921400
      }
    ],
    "mutedUsers": [
      "user456"
    ],
    "bannedUsers": [],
    "updatedAt": 1583924400,
    "createdAt": 1583921400,
    "unreadCount": 0,
    "lastReadAt": 0,
    "lastMessage": {
      "id": "sdf2l5s9j",
      "channelId": "channel123",
      "userId": "user456",
      "username": "myUsername",
      "profileImageUrl": "http://cdn.test.com/123.jpg",
      "type": "message",
      "text": "Hello world",
      "data": {
        "customField": "customData"
      },
      "parentMessage": {},
      "translations": {},
      "reactions": {"happy": 1},
      "ownReactions": [],
      "createdAt": 1583921400
    }
  }
}

Unmute Channel Members

POST https://api.talkplus.io/v1.4/api/channels/:channelId/members/unmute

Path Parameters

NameTypeDescription

channelId*

string

Headers

NameTypeDescription

content-type

string

application/json

app-id*

string

App ID

api-key*

string

App API key

Request Body

NameTypeDescription

members*

array

채널 mute 해지할 사용자 ID 목록

{
  "channel": {
    "id": "channel123",
    "name": "MyFirstChannel",
    "ownerId": "user123",
    "type": "private",
    "imageUrl": "image url",
    "invitationCode": "",
    "isFrozen": false,
    "hideMessagesBeforeJoin": false,
    "category": "", 
    "subcategory": "",
    "privateTag": "",
    "privateData": "",
    "memberCount": 2,
    "maxMemberCount": 100,
    "data": {
      "someMetaKey1": "someMetaValue1",
      "someMetaKey2": "someMetaValue2"
    },
    "members": [
      {
        "id": "user123",
        "username": "john",
        "profileImageUrl": "http://cnd.test.com/123.jpg",
        "data": {},
        "memberInfo": {},
        "lastReadAt": 1583924400,
        "lastSentAt": 1583924400,
        "updatedAt": 1583924400,
        "createdAt": 1583921400
      },
      {
        "id": "user456",
        "username": "james",
        "profileImageUrl": "http://cnd.test.com/456.jpg",
        "data": {},
        "memberInfo": {},
        "lastReadAt": 1583924400,
        "lastSentAt": 1583924400,
        "updatedAt": 1583924400,
        "createdAt": 1583921400
      }
    ],
    "mutedUsers": [],
    "bannedUsers": [],
    "updatedAt": 1583924400,
    "createdAt": 1583921400,
    "unreadCount": 0,
    "lastReadAt": 0,
    "lastMessage": {
      "id": "sdf2l5s9j",
      "channelId": "channel123",
      "userId": "user456",
      "username": "myUsername",
      "profileImageUrl": "http://cdn.test.com/123.jpg",
      "type": "message",
      "text": "Hello world",
      "data": {
        "customField": "customData"
      },
      "parentMessage": {},
      "translations": {},
      "reactions": {"happy": 1},
      "ownReactions": [],
      "createdAt": 1583921400
    }
  }
}

Mute All Channel Members (except owner)

POST https://api.talkplus.io/v1.4/api/channels/:channelId/members/mute/all

Path Parameters

NameTypeDescription

channelId*

string

Headers

NameTypeDescription

content-type

string

application/json

app-id*

string

App ID

api-key*

string

App API key

{
  "channel": {
    "id": "channel123",
    "name": "MyFirstChannel",
    "ownerId": "user123",
    "type": "private",
    "imageUrl": "image url",
    "invitationCode": "",
    "isFrozen": false,
    "hideMessagesBeforeJoin": false,
    "category": "", 
    "subcategory": "",
    "privateTag": "",
     "privateData": "",
    "memberCount": 1,
    "maxMemberCount": 100,
    "data": {
      "someMetaKey1": "someMetaValue1",
      "someMetaKey2": "someMetaValue2"
    },
    "members": [
      {
        "id": "user123",
        "username": "john",
        "profileImageUrl": "http://cnd.test.com/123.jpg",
        "data": {},
        "memberInfo": {},
        "lastReadAt": 1583924400,
        "lastSentAt": 1583924400,
        "updatedAt": 1583924400,
        "createdAt": 1583921400
      },
      {
        "id": "user456",
        "username": "john",
        "profileImageUrl": "http://cnd.test.com/456.jpg",
        "data": {},
        "memberInfo": {},
        "lastReadAt": 1583924400,
        "lastSentAt": 1583924400,
        "updatedAt": 1583924400,
        "createdAt": 1583921400
      }
    ],
    "mutedUsers": [
      "user456"
    ],
    "bannedUsers": [],
    "updatedAt": 1583924400,
    "createdAt": 1583921400,
    "unreadCount": 0,
    "lastReadAt": 0,
    "lastMessage": {
      "id": "sdf2l5s9j",
      "channelId": "channel123",
      "userId": "user456",
      "username": "myUsername",
      "profileImageUrl": "http://cdn.test.com/123.jpg",
      "type": "message",
      "text": "Hello world",
      "data": {
        "customField": "customData"
      },
      "parentMessage": {},
      "translations": {},
      "reactions": {"happy": 1},
      "ownReactions": [],
      "createdAt": 1583921400
    }
  }
}

Enable Channel Push Notification for Member

POST https://api.talkplus.io/v1.4/api/channels/:channelId/members/:memberId/push/enable

Path Parameters

NameTypeDescription

channelId*

string

memberId*

string

Headers

NameTypeDescription

content-type

string

application/json

app-id*

string

App ID

api-key*

string

App API key

{}

Disable Channel Push Notification for Member

POST https://api.talkplus.io/v1.4/api/channels/:channelId/members/:memberId/push/disable

Path Parameters

NameTypeDescription

channelId*

string

memberId*

string

Headers

NameTypeDescription

content-type

string

application/json

app-id*

string

App ID

api-key*

string

App API key

{}

Last updated