# Telegram access

> Sell access to a private Telegram group or channel: single-use invites through your bot, removed when access ends, on refunds and chargebacks.

Source: https://shopfa.st/docs/guides/telegram-access

Any product can give access to a private Telegram group or channel, the same way a product can grant a Discord role.
Signal groups, private channels and VIP chats sell like keys: with 1 Day, 7 Days, 30 Days and Lifetime options.

## Set it up

1. Connect your bot in **Settings → Telegram** (paste the token from @BotFather).
2. Add the bot to your group or channel as an admin, with the rights to **invite users** and **ban members**.
3. Open the product, find **Telegram access**, turn it on and paste the chat id (like `-1001234567890`) or the
   public `@username`. ShopFast checks with Telegram that your bot can invite and remove members.

## What the buyer sees

After payment the order page shows **Join VIP Signals on Telegram**. The button opens your bot with a signed code;
the bot links that Telegram account to the buyer and sends a **single-use invite** that expires (24 hours by
default). Only that buyer can use it. A buyer who linked Telegram once gets later invites in the chat right away.
A forwarded order link does not help anyone else: each purchase can be linked to one Telegram account only.

## How long access lasts

| Setting | Access ends |
| --- | --- |
| Follow the option or the key | The key's end date when the order has a key with one (extensions and downtime credit count), else the option's duration (`7 Days` → 7 days), else never |
| A fixed number of days | That many days after purchase |
| No end | Never |

When access ends, on a refund, or when a chargeback opens, the bot removes the member (each is a switch on the
product). Removal is a ban followed by an unban, so the buyer can come back after buying again. A chargeback you win
gives access back with a fresh invite. A check runs every minute; **Run the check now** in Settings → Telegram runs
it at once.

## Managing access

**Settings → Telegram → Telegram access** lists every purchase: who is in the chat, who has not linked Telegram yet,
who was removed and why. **Remove** takes someone out now; **Give back** sends a fresh invite.
