Skip to main content

Discord

Post messages, read channels and run a bot in your Discord servers.

Connect it with: API key. Discord's own documentation: https://docs.discord.com/developers/reference#authentication.

What agents can do​

Connect Discord so the agents working your tasks can reach it. With it connected, they can:

  • Post a message or an embed to a channel, for example a build or deploy result.
  • Read recent messages in a channel to summarise a discussion or pick up a bug report.
  • Create threads and reply in them.
  • List the servers, channels and roles the bot can see.

Before you start​

  • A Discord application with a bot user, created in the Discord Developer Portal (Applications > New Application, then the Bot page).
  • The bot invited to each server it should reach: Developer Portal > your application > OAuth2 > URL Generator, tick the bot scope and the permissions it needs (for example Send Messages and Read Message History), open the generated URL and pick the server.
  • Manage Server permission on that server, which Discord requires to add a bot.
  • A Jaah account. Anyone can add a personal secret; an organization secret needs an Org Owner or Admin.

Connect with Discord​

Jaah connects to Discord with an API key, not with a sign-in button.

Connect with an API key​

Find each value first:

  • Bot token: Discord Developer Portal (discord.com/developers/applications) > your application > Bot > Reset Token, then Copy. Discord shows the token only once, so paste it straight into Jaah.

Then add it to Jaah:

  1. In Jaah, open Secrets, select New, and pick the Discord card.
  2. Name the secret and choose who can use it.
  3. Fill in Bot token.
  4. Select Save. Jaah tests the secret straight away (see Test the connection).

Jaah encrypts what you type and never shows it again — not to you, and not to an admin.

Use your own OAuth app​

Not used: Jaah connects to Discord with an API key, not through an OAuth app.

Test the connection​

Select Test on the secret. Jaah calls Discord's API once (GET https://discord.com/api/v10/users/@me) with the stored values, and shows who it answered as, or which value Discord refused and the status it answered. Jaah also tests automatically when you save or reconnect.

The last result and its time stay on the secret's page, so you can see whether it still works without testing again.

Who can use it​

Every secret has an owner, and the owner decides who can use it:

  • Personal — only your own tasks can use it. This is the default.
  • Organization — every task in the organization can use it. Only Org Owners and Admins can choose this.
  • Attached to a project — every task on that project can use it, whoever started the task. See Attach a secret to a project.

More on owners and access: How secrets work.

Use it in an agent session​

An agent asks for the secret with its credential_get tool, by the secret's path, when it needs it, and gets the values for that one call. The path is the owner's prefix and the secret's name:

  • org/<name> for an organization secret,
  • projects/<project>/<name> for one attached to a project,
  • me/<name> for your personal one.

A key connection hands the agent its fields: bot_token.

Tell the agent in your task description which secret to use, for example “use the Discord secret org/discord”.

Manage, rotate or disconnect​

Everything is on the secret's page under Secrets:

  • Rotate a key: create a new key at the vendor first, then select Replace on the secret and paste it. Revoke the old key at Discord once the test passes. Steps: Replace or delete a secret.
  • Disconnect: select Delete. The stored values are destroyed and agents lose access on their next call. To end access at Discord's side too, revoke or delete the key at Discord.

Limitations​

  • Jaah connects a bot, not your own Discord user: agents act as the bot and see only the servers and channels it was invited to.
  • Reading message text needs the Message Content intent, switched on under Developer Portal > your application > Bot > Privileged Gateway Intents.
  • Discord rate-limits each bot per route; a burst of posts from many tasks may be slowed down.
  • Agents can do only what the connected Discord account allows.

Troubleshooting​

Test says Discord rejected the bot token (401)

The token was reset or copied incompletely. In the Developer Portal open Bot > Reset Token, copy the new token and select Replace on the secret.

The agent gets Missing Access (403) when posting

The bot is not in that server or lacks permission in that channel. Re-invite it with the OAuth2 URL Generator, or give its role Send Messages in the channel's Permissions.

Messages the agent reads have empty text

Turn on the Message Content intent under Bot > Privileged Gateway Intents in the Developer Portal.

Still stuck? Select Test and read the result: it names the value Discord refused and the status it answered.

FAQ​

Can I use a webhook URL instead of a bot?

Not as a Discord secret. A webhook only posts to one channel; store its URL as a generic secret if that is all you need.

Does the bot need to stay online?

No. Agents call Discord's REST API with the token when they need it; nothing runs between tasks.

Can Jaah or an admin see the key or token?

No. Jaah stores it encrypted and never shows it again. Only the tasks allowed to use the secret receive it, at the moment they ask for it.

Can I connect more than one Discord account?

Yes. Add one secret per account, each with its own name, and tell the agent which one to use.