Responsible Use
PAM Telegram Web acts as you: every message it sends comes from your personal account. That is useful for personal tools and dangerous when misused. Follow these rules to protect the people you talk to and your account.
Use a bot when you can
Section titled “Use a bot when you can”If your use case is notifications, customer support, commands, or anything other people interact with as a service, build a bot with PAM Telegram and the official Bot API instead. Bots are the supported way to automate Telegram.
Good fits for a user-account client are personal: archiving your own chats, searching your history, a personal assistant that drafts or forwards messages, or tests in your own Saved Messages.
Messaging rules
Section titled “Messaging rules”- Only message people who expect it. Never send unsolicited or bulk messages, and never add people to groups or channels without their consent.
- Do not scrape. Do not harvest members, usernames, or phone numbers from groups and channels.
- Respect flood limits. When Telegram answers
FLOOD_WAIT_N, waitNseconds. Do not retry in a tight loop. - Avoid loops.
onMessage()also fires for your own messages; check$message->outgoingbefore replying.
Protect the session
Section titled “Protect the session”- The session directory is your account. Anyone who copies it can read and send your messages. It is created with
0700permissions; keep it out of Git, container images, and backups you do not control. - Never show the login QR code or two-step password to anyone else, and never write them to logs.
- Call
$client->logout()when you stop using a session, so it disappears from Settings > Devices. Review that list regularly.
Protect personal data
Section titled “Protect personal data”Messages, names, and phone numbers of the people you talk to are personal data under laws such as the GDPR and Brazil’s LGPD. Store only what you need and keep it secure.