Sapilon becomes publicly available on 1 December 2026: 42 days to go. The core goes open source the same day →

Discord integration

In short

Post and edit messages in channels as a bot. Connect it on the Integrations page; your app then calls Discord through Sapilon without ever holding a Discord credential.

Lets your app post, read and edit messages in the channels of the servers your Discord bot was added to, and list those servers and channels.

Connecting

On the Integrations page choose Connect on Discord and fill in:

  • Bot token — discord.com/developers/applications → your app → Bot → Reset token. Then OAuth2 → URL generator (scope bot, permissions Send Messages and Read Message History) to add the bot to your server.

Sapilon checks the key with the provider before it saves it, and stores it encrypted; it is never shown again.

  • Add the bot to your server before your app posts there.

What your app can do

Only these requests are available; anything else is refused.

  • GET /users/@me/guilds
  • GET /guilds/*/channels
  • GET /channels/*
  • GET|POST /channels/*/messages
  • PATCH /channels/*/messages/*

How the agent uses it

Use integrations.request('discord', …); paths are relative to https://discord.com/api/v10. Discord calls servers “guilds”.

  • GET /users/@me/guilds — servers the bot is in. GET /guilds/{guildId}/channels — their channels.
  • GET /channels/{channelId} — one channel.
  • GET|POST /channels/{channelId}/messages — read recent messages or post. Example: { method: 'POST', path: '/channels/123/messages', body: { content: 'Deploy finished' } }; rich posts use embeds: [{ title, description, color }].
  • PATCH /channels/{channelId}/messages/{messageId} — edit a message the bot posted.

Reading message text needs the Message Content intent turned on for the bot.

More from Discord: https://discord.com/developers/docs/reference

Last updated .

Was this page helpful?