Skip to main content

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 TypeValue
Open channel1
Guild channel2
Private channel3

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 nameTypeDescription
channel_groupstringOpen 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 nameTypeDescription
channel_groupstringOpen channel group
channel_namestringOpen channel name
max_countnumberMaximum members
is_defaultboolFALLBACK 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 nameTypeDescription
channel_groupstringOpen channel group
channel_namestringOpen 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
}