How to Get Telegram Bot API Token in 3 Easy Steps

Getting Telegram bot API token using BotFather

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…)

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…)

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…)