Telegram BOT track who add a user - bots

I'm creating a telegram bot. I need to keep track when a user is added and who added it.
How can I do it using the telegram APIs?

In groups with the Telegram API, you can call the new_chat_members message and store the user information into an array or DB.
https://core.telegram.org/bots/api

Related

How to add parameters to telegram group invite link and get that parameters using telegram bot in group

I am making a telegram bot using nodeJs for a telegram group management I need to give referral points to a user who invites more users using the invitation link so I was finding a solution to check the new user has joined using which link so I can add points to that user.

Get message updates from a private group using telegram bot

I joined a private telegram group, I want to get message updates from this group.
I can create a bot but I can't add my bot to this group.
I checked various sources, all tells that bot needs to be in that group to be able to get updates.
Is there a chance that I get my messages from that private group that I joined but my bot not.
I intend to do that using python.
You can't use Telegram Bot API this way.
But you can use User API to get messages.
E.g.: https://docs.pyrogram.org/

Use a bot as a user on Telegram

I'm using https://github.com/yagop/node-telegram-bot-api and I'm able to send message to user and to my channels. I'd like to improve my bot, I want to manage the private messages that my bot receives.
At the moment when the BOT receive a message, I can save on database from my node application, but if I want to manage all messages, I need to build a backoffice.
Is it possible to read the messages from Telegram and impersonate the BOT and start a normal conversation?
Using Telegram bot, Telegram does not provide any function to retrieve old messages. BOT API does not have such feature.
What you need is to use TDlib - The Telegram client API. It supports both bot and normal Telegram account. And it has many features not available in BOT API.
https://github.com/tdlib/td
There is an example of creating a Userbot on this github page: UserBot
There is also a library for managing a telegram account, which is used to create cross-platform telegram clients: TDLib

Have my Telegram bot use my credentials to forward a message

I am in a private Telegram channel (of which I'm not an admin), and I need to create a bot which forwards the messages I get in that channel. I cannot make the bot a channel admin.
I've read the API, and couldn't find a hint to serve this purpose.
Is there a way maybe of letting my bot authenticate in telegram using my credentials? That way it receives the messages and can forward them.
Is it even possible to automate this process using a Telegram bot at all?
Thanks
If you need to make The Bot is Admin you must be the Admin as well
Thanks

Retrieve invited users with Telegram Bot API

I have a Telegram channel and a Telegram bot using Node.js and PSQL. With a command (for example /how), I need to return to the user the number of user which has been invited to the channel by this user (and has joined).
How can I retrieve this list of users ?
If by "invited" you mean users who sent others a link to the channel then Telegram API does not provide such functionality.
However, channel administrators can add users to the channel and those should be sent as regular Message updates with new_chat_members field set, all you have to do is log those updates to the database and then fetch it with your command.

Resources