Operations

Webhooks & Channels

Telegram, Discord, WhatsApp, Instagram, Google Calendar, and tunnel setup.

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

  1. Create a bot with BotFather.
  2. Copy the bot token.
  3. Open /dashboard/chat/channels.
  4. Select Telegram.
  5. Save token and webhook secret.
  6. Connect the provider.
  7. 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

ErrorFix
bad webhook: An HTTPS URL must be providedUse HTTPS domain or Cloudflare Tunnel.
access_denied Google verificationAdd the user as a test user or publish/verify the OAuth app.
Discord messages not arrivingCheck bot invite, guild install, intents, and webhook/gateway route.
Meta app cannot create business assetBusiness account restrictions must be resolved in Meta.
AI reply returns provider 401Reconnect provider/API token in XRouter.
Copyright © 2026