MemberPass
PlatformsTelegram

Telegram Integration

Everything you need to know about MemberPass-Telegram integration.

The MemberPass platform seamlessly integrates with the Telegram Bot API, providing essential features to manage your memberships.

Key Features:

  • A robust backend for your membership bot.
  • Automated member addition to private channels and groups.
  • Automatic removal of members once their subscription expires.

Your Membership Bot

Telegram bots are mini-apps within the Telegram ecosystem. With your MemberPass-powered bot, your clients can:

The best part? You don’t need to code any of these features—MemberPass handles everything.

Setup Guide

Setting up your membership bot is simple:

Register a Bot

Open Telegram and search for @BotFather. Send the command /newbot to create a new bot and get your token.

Connect to MemberPass

Open your project in the MemberPass bot, select Connect Bot, and paste the token you received from @BotFather.

After setup, MemberPass will handle all backend operations, including making and answering requests on behalf of your bot.

Your Membership Page

Your membership page is a public web portal hosted by MemberPass (e.g., my.memberpass.net/your-handle). Through this page, your clients can:

  • View membership plans.
  • Make one-time payments (via Stripe, etc).
  • Manage recurring subscriptions.
  • Check their current subscription status.
  • Access paid channels and groups.

Conversion Tip

Membership pages are especially useful for converting website traffic, as users can complete payments via the web interface if they prefer, or seamlessly transition to the Telegram bot.

Adding Members

MemberPass uses Single-Use Invite Links to grant access to private channels and groups, whether through the membership bot or page.

  • Each customer receives a unique invite link, which MemberPass monitors in real-time.
  • If someone else tries to use a link, it will be revoked, and the unauthorized user will be removed immediately.

Unbanning Logic

We automatically unban users before showing them invite links. This ensures that even if a user was previously removed (kicked) or banned, they can rejoin successfully without Telegram throwing an error.

Removing Members

MemberPass automatically removes users from channels and groups under the following circumstances:

  1. Their subscription or free trial has ended.
  2. A recurring subscription has been canceled (at the end of the billing period).
  3. The user has joined your group without a valid subscription (unauthorized access).
  4. MemberPass runs periodic consistency checks.

Note: MemberPass primarily kicks users (removes them) rather than permanently banning them when a subscription expires. This allows them to easily resubscribe and rejoin later. Since private groups require an invite link to join, a removed user cannot simply click "Join" to return without a new valid link.

Whitelisting & Blacklisting

Manage who gets free access and who is blocked.

Whitelisting

If you'd like to grant free access to someone, you have options:

  • Access Codes: Generate a unique access code (in "Manage Access Codes") and send it to them. They can redeem it in the bot to get a valid subscription for free.
  • Administrator: Make the user an Administrator in your Telegram Channel or Group. MemberPass does not remove administrators, even if they don't have a subscription in the database.

Blacklisting

You can block users from using your bot entirely.

  • Use Telegram's native blocking to stop a user from interacting with your bot.
  • Once blocked, the bot will ignore messages from that user.

Admin Commands

You can use these commands directly in the bot chat to manage your users. These commands by default are not made available in the bot's commands list as these are only available for project owner.

Check User

Get a detailed report about a user's status, including their active subscription, payment history, and assigned resources.

Usage:

/check <user_id>

Example:

/check 123456789

Ban User

Ban a user from your project. This will:

  1. Mark their status as Banned.
  2. Cancel all active subscriptions.
  3. Revoke all invite links.
  4. Kick them from all connected channels and groups.

Usage:

/ban <user_id>

Example:

/ban 123456789

On this page