Notifications
To receive notifications through a Telegram bot, you can follow the steps below:
1. Edit the .env
file
First, open the .env
configuration file using the nano
editor:
nano /etc/opt/marzneshin/.env
2. Set Chat ID and Bot Token
Set the following values in the .env
file. To get these values, use the following resources:
- Telegram Bot Token: To get a bot token, create a new bot via @BotFather on Telegram.
TELEGRAM_API_TOKEN = 123456789:XXXXXXXXXXXXXXXX
- Admin Chat ID: Use @chatidbot to get your chat ID.
TELEGRAM_ADMIN_ID = 123456789
- Telegram Channel (Optional): Use @chatidbot to get the chat ID of your Telegram channel.
TELEGRAM_LOGGER_CHANNEL_ID = -1234567890123
- Telegram Proxy URL (Optional): If you are using a proxy, enter your proxy URL here.
TELEGRAM_PROXY_URL = "http://localhost:8080"
3. Restart the Marzneshin Service
After setting the values, restart the Marzneshin service to apply the changes:
marzneshin restart
From now on, you will receive notifications related to users.
A webhook is a method for receiving Telegram bot notifications, where instead of being sent to the bot itself, they are directed to your API. This allows you to use these notifications in your websites or applications. However, utilizing webhooks requires technical programming knowledge and is generally not suitable for regular users.