IntegrationsIntegration setup guides

Discord

Connect Discord to your Appstrate agents.

Overview

Discord is a communication platform for communities. The integration works through OAuth 2.0 user authorization against the Discord API.

Integration: @appstrate/discord (version 1.0.5), reached through the api_call tool. For how this works, see How integrations work.

Authentication

PropertyValue
Typeoauth2
Credential sent asAuthorization: Bearer <credential>
Default scopesidentify
Token endpoint authclient_secret_basic

Scopes

The scopes below are the catalogue the integration declares. An agent gets the default scopes plus any it lists under scopes in its integrations_configuration.

ScopeDescriptionDefault
identifyRead user profile (id, username, avatar)yes
emailRead user email address
guildsList user's guilds (servers)
guilds.joinAdd user to a guild
guilds.members.readRead user's guild member info
connectionsView user's linked accounts
botAdd bot to a guild
webhook.incomingCreate incoming webhooks
applications.commandsRegister slash commands
messages.readRead messages in channels

Authorized URIs

The sidecar sends the credential only to URLs that match one of these patterns:

  • https://discord.com/api/**

Connect Discord

An administrator registers an OAuth client once, then members connect their own accounts.

Create an application in the Discord developer portal (open).

Register the redirect URI in the application's OAuth2 redirects: it is APP_URL followed by /api/integrations/callback, also shown in the integration's setup panel.

In Appstrate, open the integration and register the OAuth client (client ID and client secret). See How integrations work.

Use it in an agent

Excerpt of the agent manifest:

{
  "dependencies": {
    "integrations": { "@appstrate/discord": "^1.0.0" }
  },
  "integrations_configuration": {
    "@appstrate/discord": {
      "tools": ["api_call"]
    }
  }
}

Example prompt:

List the servers I belong to and tell me which ones I have not opened this week.

On this page