Webhooks & Channels
Webhooks & Channels
Urmate channels connect external messengers to channel agents. Incoming messages create or update channel threads, then the assigned agent replies through the provider.
Local HTTPS Testing
Telegram, Meta, and many OAuth callbacks require HTTPS. For local testing, run Urmate and expose it with Cloudflare Tunnel:
cloudflared tunnel --url http://localhost:3000
Set the resulting URL in .env.local as the public app/webhook URL used by channel setup. Also add the tunnel host to Next.js allowedDevOrigins when dev assets are blocked.
Telegram
- Create a bot with BotFather.
- Copy the bot token.
- Open
/dashboard/chat/channels. - Select Telegram.
- Save token and webhook secret.
- Connect the provider.
- Send the bot a message from Telegram.
Telegram webhook URL format:
https://your-domain.com/api/chat/channels/webhooks/telegram/{applicationId}
If Telegram says an HTTPS URL is required, your app URL is still HTTP or the tunnel/domain is not being used.
Discord
Discord needs a developer application and bot. Enable the intents your integration uses, invite the bot to a guild, and configure the application credentials in Urmate.
Use guild install for server/channel use. User install is for user-scoped app use and is not enough for normal server message handling.
WhatsApp And Instagram
Meta integrations require:
- a Meta developer app;
- business portfolio access;
- WhatsApp Business or Instagram assets;
- webhook callback URL;
- verify token;
- app secret;
- page/business tokens;
- permissions/scopes approved for production.
Use the Meta channel cards in Urmate to store credentials and connect webhooks. In development mode, only app admins, developers, and testers can use the integration.
Google Calendar
Google Calendar is separate from Google login. Use a dedicated OAuth client when you need calendar scopes.
Required redirect URL:
http://localhost:3000/api/study/instructor/calendar/callback
For production, replace the origin with your deployed HTTPS app domain.
Failure Guide
| Error | Fix |
|---|---|
bad webhook: An HTTPS URL must be provided | Use HTTPS domain or Cloudflare Tunnel. |
access_denied Google verification | Add the user as a test user or publish/verify the OAuth app. |
| Discord messages not arriving | Check bot invite, guild install, intents, and webhook/gateway route. |
| Meta app cannot create business asset | Business account restrictions must be resolved in Meta. |
| AI reply returns provider 401 | Reconnect provider/API token in XRouter. |

