Skip to Content
Xeonr Developer Docs
API SpecificationTopics

Describe a Discord channel

POST
/xeonr.notify.v1.TopicService/DescribeDiscordChannel

Looks a Discord channel up as the bot a sink on this topic would post as (the topic's app's discord_bot credential, else the owner's, else the deployment's) and returns the server it belongs to and its name. A product that lets its own tenants pick a channel uses it to check the channel is in a server that tenant owns before adding the sink, since one bot is usually in many tenants' servers.

FAILED_PRECONDITION when the bot cannot see the channel (not in that server, or no View Channel), INVALID_ARGUMENT for a channel outside any server (a DM). Needs manage on the topic.

Required scopes: notify:topics:read

Authorization

BearerAuth
AuthorizationBearer <token>

An access token from Xeonr Auth, presented as Authorization: Bearer <token>. Its audience must include https://notify.xeonr.io, and it must carry the scope the method lists.

In: header

Header Parameters

Connect-Protocol-Version*number

Define the version of the Connect protocol

Value in1
Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

topicId?string

The topic whose bot looks: the one a sink on it would post as.

Length1 <= length <= 32
channelId?string

The channel's id (a snowflake).

Match^[0-9]{17,20}$
Length17 <= length <= 20
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://notify.xeonr.io/xeonr.notify.v1.TopicService/DescribeDiscordChannel" \  -H "Connect-Protocol-Version: 1" \  -H "Content-Type: application/json" \  -d '{}'
{
  "channelId": "string",
  "guildId": "1180012345678901234",
  "name": "string"
}