Transfer group channel ownership
Transfer a group channel to a new owner.
Request
POST: https://Base URL/v4/group-channel/transfer/owner
Rate limit: 100 per second
Signature: Required. See API request signature.
Request body
Content type: application/json
| Parameter | Type | Required | Description |
|---|---|---|---|
channelId | String | Yes | Group channel ID. |
newOwner | String | Yes | User ID of the new owner. |
shouldLeave | Number | No | Whether the original owner leaves the group channel. 0: stay in the channel (default). 1: leave the channel. |
shouldDeleteMute | Number | No | Whether to also remove the original owner's mute state when shouldQuit is 1. 0: no. 1: yes (default). |
shouldDeleteAllowedSendersList | Number | No | Whether to also remove the original owner from the allowed senders list when shouldQuit is 1. 0: no. 1: yes (default). |
shouldDeleteFavorites | Number | No | Whether to also remove the original owner's favorite-member settings when shouldQuit is 1. 0: no. 1: yes (default). |
Request example
HTTP
POST /v4/group-channel/transfer/owner HTTP/1.1
Host: api.sg-light-api.com
App-Key: uwd1c0sxdlx2
Nonce: 14314
Timestamp: 1408710653491
Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8
Content-Type: application/json
{
"channelId": "groupId1",
"newOwner": "fff",
"shouldQuit": 0
}
Response
| Field | Type | Description |
|---|---|---|
code | Number | Return code. 0 indicates success. See Status codes. |
Response example
HTTP
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"code": 0
}