CIRCE / DOCUMENTATION
Transports
Gateway, HTTP and hybrid modes, signature verification and replay protection.
On this page
Choosing a transport
| Transport | Behaviour | Use it for |
|---|---|---|
gateway |
Stateful WebSocket connection. Default. | Message content, presence, voice and any gateway event. |
http |
Stateless interactions endpoint, no gateway. | Serverless, containers and slash-command-only bots. |
hybrid |
Gateway for events and presence, HTTP for interactions. | Bots that need both. |
export default defineCirceConfig({
config,
intents: [GatewayIntentBits.Guilds],
transport: "http",
http: { publicKey: process.env.DISCORD_PUBLIC_KEY!, port: 8787 },
});
The type system requires http: { publicKey } for http and hybrid. Your handlers are identical in every mode.
Security
- Requests are verified with Ed25519 using native
crypto.subtle.verify; no dependency. - A signed interaction whose
idwas already dispatched inside the freshness window is rejected with409(replay protection). - Request size is capped before parsing.
