// discord integration

Run a Discord bot or interactions endpoint locally

Discord's interactions endpoint and OAuth callback both require HTTPS. Slash commands and OAuth flows won't work without a public URL. Tunneling through lrok takes one command.

1 · Set up the lrok tunnel

  1. 1. Reserve

    $ lrok reserve mybot-dev
  2. 2. Run bot

    $ python bot.py
  3. 3. Tunnel

    $ lrok http 5000 --hint mybot-dev

2 · Configure Discord

  1. 1. Discord Developer Portal → your app → General Information

    Interactions Endpoint URL: https://mybot-dev.lrok.io/interactions

  2. 2. OAuth2 → Redirects

    https://mybot-dev.lrok.io/oauth/callback

  3. 3. Save — Discord verifies by sending a test interaction

    Your handler must respond within 3 seconds with a valid signature check.

// discord-specific gotcha

Discord verifies interactions via Ed25519 (X-Signature-Ed25519 + X-Signature-Timestamp). The lrok proxy passes both headers through unmodified. The 3-second timeout is strict — if your local handler spends a second on cold-start signature verification, Discord may reject it.

More integrations