If you’ve created a Telegram bot and now you need to get its API token, the process is simpler than you might think. Using BotFather, Telegram’s official bot management tool, you can quickly retrieve or regenerate the token. This guide will walk you through the necessary steps to locate your Telegram bot API token quickly and securely. Below are the step-by-step instructions. (more…)
telegram
MikroTik: Telegram Notification on Login Attempt
MikroTik logs are valuable on their own, but they are even more useful when paired with Telegram notifications.
Receiving notifications on Telegram when someone is trying to log in to your MikroTik router can help to detect suspicious login attempts, including potential hacking attempts, allowing you to take appropriate action in a timely manner.
In this article, I will guide you through the process of configuring a separate log file on your MikroTik router that will only contain authentication log entries.
And also I will show how to set up a scheduled script that will be sending a notification about each login attempt to Telegram. (more…)
MikroTik: Send Message to Telegram
Notifications are an important part of monitoring of a MikroTik router’s health, performance and different events, including potential security issues.
Telegram is a popular messaging app that offers a variety of features, including notifications.
It can be used to receive notifications from various sources, including MikroTik.
This post provides a step-by-step guide on how to configure MikroTik to send messages to Telegram and integrate it into MikroTik scripts. (more…)
Python: Send Message to Telegram
To send a message to a Telegram channel using Python, first of all it is required to create a Telegram bot.
While creating the Telegram bot you will get an apiToken and a chatID that will be used in a Python script to access the Telegram API and send the message.
In this note you will find the examples of the Python scripts for sending messages, images, etc. to Telegram through the API. (more…)
WordPress: Auto-Post to Telegram Channel (No Plugin)
You can easily increase visitor traffic to your WordPress website by integrating it with a Telegram channel.
However, manually sharing every blog post to the Telegram channel can become a time-consuming task – especially if you publish an article every day.
In this note i will show how to create a callback function that will automatically publish new posts from your WordPress website to the Telegram channel without any plugins. (more…)
Telegram: Rename Bot
To change the name of a Telegram bot, start a chat with the @BotFather and send the /setname command.
You will be prompted to select the Telegram bot which you want to rename and once selected you will be asked to type the new name of your bot. (more…)
WordPress: Comment Hook – Trigger Action Example
Actions are the hooks that the WordPress core launches at specific points during execution, or when specific events occur.
To trigger the action firstly you need to write a custom function known as a callback, and then register it with a WordPress hook using the add_action function in your child theme’s functions.php file.
This note shows the examples of how to trigger some action when a new comment is posted on a WordPress site, e.g. send an email or a message to a Telegram channel. (more…)
Telegram: Send Message using PHP
To send a message to a Telegram channel using PHP, you need to know a Telegram API token and a chat ID, that you will get when you create a Telegram bot.
This note shows the PHP code examples for sending messages, images and other data types to the Telegram channel through API. (more…)
Install Telegram on Ubuntu
Telegram is a popular cross-platform, cloud-based instant messaging system with a focus on security and speed.
The telegram-desktop is a native Telegram app for Linux that can be installed on Ubuntu and Linux Mint from the official repositories. (more…)
Telegram API: Send Message – Personal Notification Bot
How about to get a push notification when some long-running job in Linux is completed?
Or how about to have a script in crontab that collects some data and periodically sends the reports to your mobile device?
This tutorial describes how to create a personal notification bot, that can send messages from the Linux command-line through the Telegram API. (more…)