Nitty Music Social Management

Other platforms

Telegram

How to add Telegram to your system

Nitty Music Social talks to Telegram using long-polling (getUpdates). Telegram allows only one connected process per bot token at a time. If you run Nitty Music Social against the same TELEGRAM_TOKEN from two places (e.g. self-hosted plus cloud, or two self-hosted instances), each instance will continuously kick the other off and you’ll see 409 Conflict: terminated by other getUpdates errors in the logs.

Use one bot token per Nitty Music Social deployment. If you need Telegram on multiple environments, create a separate bot for each.

1

Create a Telegram Bot

  1. Open Telegram and message @BotFather.
  2. Click Start
  3. Click Menu
    • Click "Create a new bot"
    • Enter a name for your bot (e.g., MyNitty Music SocialBot).

Name Bot

  • Choose a unique username ending with "bot" (e.g., MyNitty Music SocialBot_bot).

Unique Bot Name

Once your bot is created, BotFather will give you an API Token. Keep it safe: you will need it later.

Bot Token

2

Configure Bot Group Permissions (optional but recommended)

  1. Click on "Menu"
  2. Click on "Edit your bots"
  3. Select your bot
  4. Click on "Bot Settings"

Bot Settings

  1. Click on "Group Privacy"

Group Privacy

  1. If "Privacy mode" is enabled, turn it off (it is enabled by default)
3

Add Your Bot to Telegram Groups or Channels

  1. Navigate to your group/channel
  2. Add your bot to your group/channel
  3. The bot requires these permissions to work with Nitty Music Social:
    • access to messages, so the bot can read messages sent in the group/channel
    • Send Text Messages: so the bot can send messages
    • Send Media: so the bot can send media

While not strictly required, making your bot an admin is recommended. It will give the bot all the permissions needed and make the setup easier and faster.

4

Add Bot Token to Your Application

In your .env file, add the Telegram Bot Name (Without the @) and the Telegram Bot API Token that you received from BotFather in Step 1:

TELEGRAM_BOT_NAME="MyNitty Music SocialBot_bot"
TELEGRAM_TOKEN="MyNitty Music SocialBot token"

You should be able to connect your group/channel to Nitty Music Social now!