Create a community channel
Create a single community channel. There is no limit on the number of community channels per app.
Workflow
Nexconn does not host community channel business logic, so all business logic must be implemented on your app server. For client developers, creating a community channel only requires interacting with your app backend.
To create a community channel from the app client, the app sends a request to your app server, which then calls the Nexconn Server API. Your app server generates the community channel ID. On success, the result is returned to the client.
- If your app or environment activated community channel service after October 13, 2022, creating a community channel automatically creates a default subchannel with the ID
RCDefault. TheRCDefaultsubchannel is open to all members and cannot be converted to a private subchannel. - If you only need a large group chat, route all messages through the
RCDefaultdefault subchannel. Always explicitly specify the subchannel ID asRCDefaultwhen calling client and server APIs. If you need sub-communities (like Discord), use custom subchannels exclusively. See Community channel overview for details.
Request method
POST: https://Base URL/v4/community-channel/create
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 add as the initial member upon creation. Only one user ID is supported. |
channelId | String | Yes | The community channel ID. Maximum 64 characters. Supports uppercase and lowercase letters and numbers. |
name | String | Yes | The community channel name. Used in push notifications. If the name changes, call the Update community channel info API to sync. |
Request example
POST /v4/community-channel/create HTTP/1.1
Host: api.sg-light-api.com
App-Key: uwd1c0sxdlx2
Nonce: 14314
Timestamp: 1408710653491
Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8
Content-Type: application/json
{
"userId": "jlk456j5",
"channelId": "abcdefg",
"name": "My Community"
}
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}