Skip to main content

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.

tip
  • 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. The RCDefault subchannel 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 RCDefault default subchannel. Always explicitly specify the subchannel ID as RCDefault when 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:

ParameterTypeRequiredDescription
userIdStringYesThe user ID to add as the initial member upon creation. Only one user ID is supported.
channelIdStringYesThe community channel ID. Maximum 64 characters. Supports uppercase and lowercase letters and numbers.
nameStringYesThe community channel name. Used in push notifications. If the name changes, call the Update community channel info API to sync.

Request example

HTTP
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:

FieldTypeDescription
codeNumberStatus code. 0 indicates success.

Response example

HTTP
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{"code":0}