Leave a community channel
Remove a user from a specified community channel. After leaving, the user no longer receives messages from the community channel.
Workflow
Nexconn does not host community channel business logic, so all business logic must be implemented on your app server. For client developers, removing a user from a community channel only requires interacting with your app backend.
To remove a user from a community channel via the app client, the app sends a request to your app server, which then calls the Nexconn Server API.
Request method
POST: https://Base URL/v4/community-channel/quit
Rate limit: 100 requests per second
Signature required: All server API requests require signature verification. See API request signature.
Request body
The request body is in application/json format and supports the following parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
userId | String | Yes | The user ID to remove. |
channelId | String | Yes | The community channel ID to leave. |
Request example
POST /v4/community-channel/quit HTTP/1.1
Host: api.sg-light-api.com
App-Key: uwd1c0sxdlx2
Timestamp: 1408710653491
Nonce: 14314
Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8
Content-Type: application/json
{
"userId": "jlk456j5",
"channelId": "abcdefg"
}
Response
The response body contains a JSON object with the following structure:
| Field | Type | Description |
|---|---|---|
code | Number | Status code. 0 indicates success. |
Response example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{"code":0}