TEASEDocs
ProductsLinkTelegram gate

Sync or edit the bot's Telegram profile

Make the bot's public Telegram identity — name, bio, avatar — match what the panel shows.

The bot's public face (display name, description, short description, avatar) lives on Telegram's side, not in your gate settings. The panel keeps a local copy of that truth so the bot card can show a name and picture without calling Telegram on every page load — this page covers pulling that copy fresh, and pushing edits back out.

Pull the current profile (sync)

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

This reads getMe, getMyDescription, getMyShortDescription, and the bot's largest profile photo from Telegram, and stores them. It's partial-tolerant — whatever step succeeds gets saved even if another step fails; the response adds "synced": true|false and an "errors" array naming exactly which Telegram calls failed. synced_at (shown as "synced N ago" in the panel) only advances when at least one step actually worked.

In the panel this is the Sync button next to the bot's name — connecting or reconnecting a bot already triggers this once, best-effort, so a fresh connect usually needs no manual sync.

Read the avatar

The synced avatar is served back from the panel itself, not from Telegram directly:

GET /api/admin/tg/gate/avatar

404 when this owner has no synced avatar. The bot card's <img> appends ?v=<synced_at> to bust the browser cache the moment a new sync changes the picture.

Edit the profile through Telegram

Name, bio, and short bio are edited by pushing to Telegram, not by writing a local field — Telegram is the source of truth, so an edit is a live setMyName / setMyDescription / setMyShortDescription call, followed by a re-sync to confirm what actually stuck:

curl -X POST https://app.tease.link/api/admin/tg/gate/profile \
  -H "Authorization: Bearer $TEASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Support",
    "bio": "What the bot does and why to press /start",
    "short_bio": "reach me here"
  }'
FieldTelegram limit
name64 characters
bio (description)512 characters
short_bio120 characters

Only the fields you include are pushed; each is validated against Telegram's real cap before any network call, with 422 on overflow. In the panel this is the What people see in Telegram card — Bot name, Bot description, Short description fields and the Update the bot profile button, enabled only once something actually changed.

The avatar itself can't be set through this endpoint — Telegram's Bot API has no method for it. Change the picture in @BotFather directly, then hit Sync here to pull it in.

Telegram rate-limits setMyName aggressively. A retry-later response surfaces as 502 telegram_rate_limited — the panel's toast says "Telegram rate-limited profile changes — try later". Wait before retrying rather than hammering it.

How to know it worked

The response is the same GET shape the panel reads — bio, short_bio, and name (via bot.name) reflect what Telegram actually accepted, not just what you sent, because the endpoint re-syncs after pushing. Open the bot in Telegram itself and check the profile screen for the final confirmation.

If it didn't work

  • 409 connect a bot first — there's no connected bot (or token) for your account yet; see Connect your own turnstile bot.
  • 502 telegram_rate_limited — Telegram is throttling profile writes; wait and retry.
  • 502 telegram_unreachable — a network fault; retry.
  • Avatar never appears after sync — confirm the bot actually has a profile photo set in Telegram; sync reports "synced": true even when there's simply nothing to show.

What's next

On this page