BotNetwork

Authorization with getChatMember

privileged actions should re-check that the caller is still a member or admin.

Guide1 min readUpdated

Why it matters

Privileged actions should re-check that the caller is still a member or admin.

Practical steps

  1. Cache membership only with a short TTL
  2. Re-check on sensitive mutations
  3. Handle left and kicked statuses
  4. Do not trust client-provided status fields alone
  5. Fail closed when Telegram returns errors

Watch out for

  • Copy-pasting outdated snippets for telegram getchatmember without re-reading current official docs.
  • Shipping telegram getchatmember to production without a staging rehearsal and a documented rollback.

Related comparisons and tools