Skip to main content

Join a community channel

Add a user to a specified community channel.

  • There is no upper limit on members per community channel, but each user can join up to 100 community channels.
  • After joining, the user can receive messages from the community channel.
  • New members can only view messages created after they join by default. To allow new members to see messages from before they joined, enable Enable pre-join history access by new member under Chat > Chat settings > Community Channels on the Chat settings page.

Workflow

Nexconn does not host community channel business logic, so all business logic must be implemented on your app server. For client developers, joining a community channel only requires interacting with your app backend.

To join 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 maintains the community channel ID. On success, the result is returned to the client.

Request method

POST: https://Base URL/v4/community-channel/join

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. Only one user per request.
channelIdStringYesThe community channel ID to join.

Request example

HTTP
POST /v4/community-channel/join HTTP/1.1
Host: api.sg-light-api.com
App-Key: uwd1c0sxdlx2
Timestamp: 1408710653491
Nonce: 14314
Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8
Content-Type: application/json

{
"userId": "jzk4j6x5",
"channelId": "abcdefg"
}

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}