채널 주인 변경

Transfer Channel Ownership

POST https://api.talkplus.io/v1.4/api/channels/:channelId/transfer/ownership

채널 주인은(owner) 채널 소유권을 채널 내 멤버에게 이관할 수 있습니다.

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

userId*

string

채널의 새주인이 될 채널 멤버의 userId

{
  "channel": {
    "id": "channel123",
    "name": "MyFirstChannel",
    "ownerId": "new_owner_user_id",
    "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": "new_owner_user_id",
        "username": "New Owner",
        "profileImageUrl": "http://cnd.test.com/456.jpg",
        "data": {},
        "memberInfo": {},
        "lastReadAt": 1583924400,
        "lastSentAt": 1583924400,
        "updatedAt": 1583924400,
        "createdAt": 1583921400
      }
    ],
    "mutedUsers": [],
    "bannedUsers": [],
    "bots": [],
    "updatedAt": 1583924400,
    "createdAt": 1583921400,
    "unreadCount": 0,
    "lastReadAt": 0,
    "lastMessage": {
      "id": "sdf2l5s9j",
      "channelId": "channel123",
      "userId": "new_owner_user_id",
      "username": "New Owner",
      "profileImageUrl": "http://cdn.test.com/456.jpg",
      "type": "message",
      "text": "Hello world",
      "data": {
        "customField": "customData"
      },
      "parentMessage": {},
      "reactions": {"happy": 1},
      "createdAt": 1583921400
    }
  }
}

Last updated