Channel
You can create and delete channels or look up the channel list.
Channel type
BACKND's chat provides three types of channels.
They are open channel, private channel, and guild channel (useful when utilizing guild functions in Base),
and they have channel groups, channel names, and channel number properties.
info
Currently, Platform API only supports functions for open channels.
The following are values that must be inserted as channel types when using the API.
Channel Type | Value |
---|---|
Open channel | 1 |
Guild channel | 2 |
Private channel | 3 |
Open channel
A type that is appropriate when members change fluidly, which include channels for all users and language-specific channels.
An increase in members results in an automatic expansion of channel numbers.
Entrance is processed automatically, and a FALLBACK channel can be designated.
Import open channel group list
HTTP request
GET https://platformapi.thebackend.io/chat/v1/open_channel_groups
Responses
Status: 200 OK
[
"global"
]
Error
Status: 400 Bad Request
{
"message": "There is a problem with the user credentials.",
"code": 400701,
"error": true
}
Import open channel list
HTTP request
GET https://platformapi.thebackend.io/chat/v1/open_channels
Parameters
Parameter name | Type | Description |
---|---|---|
channel_group | string | Open channel group |
Query string example
?channel_group=global
Responses
Status: 200 OK
[
{
"channel_name": "server-1",
"channel_id": 1,
"max_count": 50,
"is_default": true,
"is_autoscaling": true,
"players": [{"gamer_id": "1234", "gamer_name": "a1234"}],
"last_chat_time": "2024-06-17 09:50:23",
"create_at": "2024-06-17 09:47:11",
}
]
Error
Status: 400 Bad Request
{
"message": "There is a problem with the user credentials.",
"code": 400701,
"error": true
}
Create an open channel
HTTP request
PUT https://platformapi.thebackend.io/chat/v1/open_channels
Request body
Property name | Type | Description |
---|---|---|
channel_group | string | Open channel group |
channel_name | string | Open channel name |
max_count | number | Maximum members |
is_default | bool | FALLBACK status |
{
"channel_group": "global",
"channel_name": "server-1",
"max_count": 50,
"is_default": true
}
Responses
Status: 200 OK
{
"channel_group": "global",
"channel_name": "server-1",
"channel_id": 1,
"max_count": 50,
"is_default": true,
"create_at": "2024-06-21 07:34:59"
}
Error
Status: 400 Bad Request
{
"message": "There is a problem with the user credentials.",
"code": 400701,
"error": true
}
Delete open channel
HTTP request
DELETE https://platformapi.thebackend.io/chat/v1/open_channels
Request body
Property name | Type | Description |
---|---|---|
channel_group | string | Open channel group |
channel_name | string | Open channel name |
{
"channel_group": "global",
"channel_name": "server-1"
}
Responses
Status: 200 OK
[
{
"channel_group": "global",
"channel_name": "server-1",
"channel_id": 1
}
]
Error
Status: 400 Bad Request
{
"message": "There is a problem with the user credentials.",
"code": 400701,
"error": true
}