Go to chat message with specific text with Telegram API - telegram-bot

I'm looking for information about this, but I don't find anything.
Is possible send to user to a chat message that contains a specific text?

This request below can be made with multiple languages.
https://api.telegram.org/bot[BOT_API_KEY]/sendMessage?chat_id=[MY_CHANNEL_NAME]&text=[MY_MESSAGE_TEXT]
where:
BOT_API_KEY is the API Key when you created your bot
MY_CHANNEL_NAME is the handle of your channel (e.g. #my_channel_name)
MY_MESSAGE_TEXT is the message you want to send (URL-encoded)
https://medium.com/#xabaras/sending-a-message-to-a-telegram-channel-the-easy-way-eb0a0b32968

Related

How can I find telegram user by id

I'm using telegram bot and can get user id from incoming message.
Sometimes I want to find users who communicate with telegram bot and write them message by myself.
I have only user id and have not some additional information about the user.
Can I somehow find users by id or anonimity with only id available is by design?
At least what I've been using...
Program your bot to send you a message with link to that user.
This can be done by using link in your message (must be used as message entity or inline keyboard button):
tg://user?id=<user_id>
Or in case you are using MarkdownV2 for formatting
[inline mention of a user](tg://user?id=<user_id>)
Then, by clicking on that link, you will open a user profile, where you can message your target.
Note, user can change his privacy settings, and disable mentions. In this case these links will not work.

Google chat auto-reply bot

Is there any way to configure Google Chat so It will automatically reply when another user sends me a message? Similar to the way vacation reply works for GMAIL.
The trigger will be the message coming from a user. not calling any bot.
Sorry, unfortunately there is no way to do that
You can set your status as "Out of Office" and that will be reflected in chat.
https://support.google.com/mail/answer/25922?co=GENIE.Platform%3DDesktop&hl=en
The API is designed for bots so there is no way via API either.
You can always make a feature request, if you like.

How to get specific channel chat history using telegram bot api?

I am using telegram bot api to get the chat history of a channel https://api.telegram.org/botXXXXXXXXXXXXXXXXXX/getupdates
my bot attached to the many channels and my query is that how to get chat history of any specific channel which is using my bot.
but when I am using getupdates method it shows all the message with all channel.
my query is how to get the solution using telegram bot API?
just like when we need to send a message to any specific channel using the used the https://api.telegram.org/botxxxxxxxxxxxx/sendMessage?chat_id=#channel id&text=message
i need a solution where I can send channel id and get the specific channel chat history using telegram bot API
my bot attached to the many channels and my query is that how to get
chat history of any specific channel which is using my bot
You cannot get the chat history of a channel using the bot API. However you can use the core API (tdlib e.t.c) to get the chat history. Alternatively you can try and scrape from the posts widget, but that is going to be too tedious.
but when I am using getupdates method it shows all the message with all channel.
You can manually filter out the channels since the ID is always in the Update object. I would suggest you use a library for this since it would be easier to implement the logic.

How to know if user has seen a message sent by my bot in Telegram?

I'm developing a Telegram bot, and I want to know whether a user, that has started a private chat with my bot, has seen a certain message sent by bot, and to know when has he seen it.
Is it possible to do so?
Thank you very much.
That's currently not possible.
I'm using this solution.
Create a channel specially for your bot
Let your robot send message from this channel to users, you can use forward method.
Now you can see how many users have seen your message
Telegram Bot API has limit functionality. There is absolutely no way to get message view count at the time of this comment.
Usually TDLib can be used instead of Telegram Bot. It is Telegram client library. You can use it directly or make it as services for BOT to call.
For example. use TdApi.GetMessage to get the message, and the returned message has field of interactionInfo which contains forwardCount or viewCount.
perhaps this answer help you :
in the end of your message place
link example : yoursite.com\checkvisit.php?id=1234
when user open message link automatic run for telegram ...
you can understand message was read
you must in checkvisit.php set to check db if id exist and not read set it to read
then id in db remove or disable
but this method simple - telegram must add 1 parameter to return this
sorry my english not good
it is not possible yet , you might want to search for Madeline bot

How can I send message to specific chatID?

I have chatId and want send messages while execute some tasks from java code. I found this explain on telegram "Bots can't initiate conversations with users. A user must either add them to a group or send them a message first. People can use telegram.me/ links or username search to find your bot." But my task works good when I use https request directly from browser. My bot perfectly answer for requests but how I can do this without user request?
I can not truly understand your case!
Anyway, your bot can send a message to a chat ID Only if the user witch blongs to the specified chat ID added your bot (send start to a bot).
and if it happened then send your message with
/sendMessage