Connect Discord
Get website chats in Discord and reply with /reply in the thread.
What you’ll set up
When someone chats on your website, CanWeChat opens a thread in a Discord channel you choose. You answer with /reply inside that thread, and the visitor sees it on the site.
Plan on about 15 minutes. You’ll use Discord’s Developer Portal (not Discord’s normal settings). Follow the left sidebar names below — Discord moved invite setup to Installation; you usually won’t need OAuth2 → URL Generator.
Step 1 — Create the Discord app
Open discord.com/developers/applications and sign in.
Click New Application, name it something like “CanWeChat”, accept the terms, and create it.
You land on General Information. Leave this page open — you’ll come back for the Interactions Endpoint URL later.
Step 2 — Create the bot and copy credentials
Still on General Information, copy Application ID and Public Key. You’ll paste both into CanWeChat.
In the left sidebar, open Bot. If there’s no bot yet, click Add Bot / Reset Token and confirm.
Click Reset Token (or Copy), confirm, and save the token somewhere private. Discord often shows it only once. That token starts looking like a long random string — treat it like a password.
Step 3 — Install the bot to your server
In the left sidebar, open Installation (this is the current invite flow).
Under Installation Contexts, turn on Guild Install (install to a server). User Install is optional and not required for CanWeChat.
Under Install Link, choose Discord Provided Link so Default Install Settings appear.
Under Default Install Settings → Guild Install, add scopes: applications.commands and bot. When bot is selected, set permissions to at least: View Channels, Send Messages, Send Messages in Threads, Create Public Threads, Attach Files, and Use Application Commands.
Save Changes. Copy the install link from the Install Link section, open it in your browser, pick your Discord server, and authorize.
In Discord, confirm the bot appears in the member list and can see the channel where you want chats (edit channel → Permissions if needed).
Step 4 — Copy the channel ID
In the Discord app: User Settings → Advanced → turn on Developer Mode.
Right-click the text channel where visitor chats should land → Copy Channel ID. It is a long number — not the channel name like #support.
Step 5 — Connect in CanWeChat
In CanWeChat, go to Integrations → Discord → Connect.
Paste bot token, application ID, public key, and channel ID. Channel name is optional. Click Connect Discord.
On a successful connect, CanWeChat registers the /reply slash command for your server automatically. You don’t create /reply by hand in Discord.
Step 6 — Set the Interactions Endpoint URL
Go back to the Discord Developer Portal → your app → General Information (not Installation).
Find Interactions Endpoint URL and paste exactly: https://canwechat.dev/api/v1/integrations/discord/interactions
Click Save Changes. Discord will ping CanWeChat to verify the URL. This only works after Step 5 succeeds (CanWeChat must already have your public key).
If verification fails, wait a few seconds and try Save again, or double-check you pasted the public key from this same app.
How to reply
Send a test message from your website chat. A new thread should appear in your Discord channel, often with visitor details. Photos and PDFs appear in the thread when Attach Files is allowed.
Open that thread. Type /reply, fill in the message field, and send. A normal Discord message in the thread does not reach the visitor — only /reply does.
If /reply doesn’t show up yet, leave the thread, wait a minute, or restart the Discord desktop/mobile app so slash commands refresh.
If something goes wrong
I can’t find OAuth2 → URL Generator: You don’t need it. Use Installation → Discord Provided Link → Default Install Settings instead.
No thread appears: Make Discord your active destination on Integrations, confirm the bot is in the server and channel, and that the Channel ID is correct.
Files don’t show: Give the bot Attach Files on that channel, then send a new website message with a file.
/reply missing or does nothing: Reconnect Discord in CanWeChat (so /reply is registered again), confirm Interactions Endpoint URL is set and verified, and run /reply inside the visitor’s thread — not in the main channel.
Connected before /reply existed: Open Integrations → Discord, disconnect, then Connect again with the same values so CanWeChat can register /reply.