Telegram start new chat with HTTP requests, no BOT nor API - python

I want to start a new chat in Telegram with a Python script but I know with neither Telegram's BOT nor its API it is possibile.
If so, why can I start a new chat on Telegram Application (or Web) with someone?
I suppose Telegram client sends HTTP/s requests to achieve this. Is this feature possible to replicate with a Python script?

Related

Telegram start new chat with Python

I want to start a new chat in Telegram with a Python script but I know with neither Telegram's BOT nor its API it is possibile.
I don't want the user starts the chat with a BOT before!
However I was wandering if you can achieve this in anther way. I mean, when you create a new chat with Telegram application, there will be, somehow, and endpoint which handle this request.
Why is it impossibile to create a Python script which emulates this action?
I don't want the user starts the chat with a BOT before!
This is not possible. A Bot can never start a chat, that has to be done by the user him/her self.
After the user has started a conversation with the Bot, you can send anything to the user until the user stops the conversation.

Grant access to telegram bot in chats

I have a slightly different question about telegram bot using botfather. Is it possible to grant access to the bot in some private chat on my telegram? For example: I am on a telegram channel, and I would like the bot to have access to these messages without having to put the bot on the channel.
I'm currently using Python 3.10x and I'm using the telegram API via requests (I'm not using any libraries).
I thought that since there is the /getUpdates endpoint that makes the bot read messages where it has access, maybe it can also have access to some private chat of any user (as long as the user obviously allows it somehow)

How to reply to the user DM via Slack API?

My setup is as follows: I have Dialogflow bot added as an app. The bot interacts with Slack and Dialogflow. The script uses dialogflow_fulfillment to handles the requests to return the response back to Dialogflow. At the same time, I want the bot to interact with the users like questionaries or buttons without routing back to Dialogflow. I can get it to post messages to any specified channel using client.chat_postMessage(). However I want to the bot to reply directly to the user when the user DM the app. I am not sure how this can be achieved. Please advise.
It turns out that using one app to monitor another app is not allowed by Slack. So this was not possible. The only possible way is to merge it to one app and use event api on it.

How to save a message from a telegram chat and send other messages with your own account?

I want to build a code that save a certain telegram message, from a user, as an input (ex: "David: Hello how are you doing?") and be able to send a certain message back, with my own telegram account (ex: "Me: I'm fine! How are you?")
Is there a way I can do this in python without using a telegram bot? Because I dont think bots can actually connect to your own telegram account and send messages
Unfortunately, the only way to achieve this kind of results is by creating your own customized Telegram app, take a look at the API docs at https://core.telegram.org/api

CLIENT side of telegram bot, is it possible?

For telegram messenger, is it possible to create bot that resides on PC side, i.e. on user's side of telegram ? (all telegram bot tutorials assumes you need telegram bot "from telegram side", i.e. bot that interact with user, but I need bot on other side of conversation, on PC (from my side), need bot that interact with existing telegram channels/bots/users). Is there any python bot module for this task?
Thanks for any help.
Here is a solution that works perfectly:
https://github.com/LonamiWebs/Telethon

Categories

Resources