TEASEDocs
ProductsLinkTelegram gate

Disconnect the bot

Turn the gate off without losing saved settings, for a later reconnect.

Disconnecting removes the bot's token and turns the gate off, but keeps every other setting — greeting, destinations, rules, split thresholds — untouched in the database, so reconnecting later (even a different bot) starts from where you left off rather than a blank slate.

Two different "off" switches

The bot card has two separate controls that are easy to conflate:

  • Bot on (a switch) — PATCH { "enabled": false }. Pauses the gate while keeping the token and webhook registration intact. The quickest way to go quiet temporarily; flip it back on to resume instantly.
  • Disable (a button, next to Sync/Change bot) — this is the actual disconnect, covered below. The panel asks you to confirm because /start stops answering entirely until you connect a token again.

If you only want a short pause, use the Bot on switch instead of disconnecting.

Disconnect

curl -X POST https://app.tease.link/api/admin/tg/gate/disconnect \
  -H "Authorization: Bearer $TEASE_API_KEY"

This is best-effort on Telegram's side (it tries deleteWebhook, and ignores a failure — the token may already be revoked) and then tombstones the row locally: the token is cleared and enabled is forced off. It's idempotent — calling it again with nothing connected just returns the same "not configured" state.

How to know it worked

The bot card switches to the disconnected view ("Not connected") and offers the token field again. Telegram will no longer deliver /start updates for this bot at all — a stale delivery that does arrive is answered with a quiet 200 and nothing is stored or sent, rather than resurrecting the bot.

Reconnecting later

Paste a token (the same bot's, or a different one) and connect again — see Connect your own turnstile bot. Your greeting, destinations, and rules are still there; only the bot identity and webhook needed re-establishing.

A disconnect never deletes your traffic split, rules, or /start history — only the live token and webhook registration go away. There's nothing to back up first.

What's next

On this page