Telegram how to send message user from group through Api? - telegram

On some website (http://ad1.ru/) I had seen possible get personal notify eq :(offer, ticket, discound) on telegram. I can to add only mobile phone (+7 906 247 00 01) in my contact list telegram and all.
How they did it?
I read telegram api documention and I found nothing. also I found this question How to obtain Telegram chat_id for a specific user?
wherein said that before send message I can get chat_id and send message boot telegram for get user chat_id from message

After obtaining user's phone number you can send an SMS to that number with a link to a bot like https://telegram.me/YourBot?start={SOME_ID_ASSOICATED_WITH_PHONE_NUMBER}
Once user opens the link and start bot you can send him/here messages through bot until blocked/unsubscribed.
If a user with the same phone number already subscribed to the bot no need to send an SMS.

Related

Send Telegram message as a user

I want to know if it possible to send message to my telegram bot as a user.
Maybe I should send a request with my credentials? Or I am completely missing something?
UPD:
Ok I see it is not clear. I want to send message using program.
Open your Telegram App, search for your bot and open the chat with it. Then type a message and hit send.

Is it possible to send messages to Telegram's "Saved Messages" through the API?

Is it possible to send a message via Telegram API to the Saved Messages chat?
I have been looking all over the internet but could not find any information. I would think this would be possible.
If you mean the main mtproto api, yes you can send yourself a message by your id or username and telegram will place it in saved messages.
You did not mention which API you use, but this is how you do it in Telethon:
client.send_message("me", "hello")
But if you mean bot api, it's not possible for bots to send messages to your saved message.

Telegram bot livecheck or how to get bot's chat id

Can I use telegram api for the bot live-check automation? There are dozens of bots created by a third-party service so I cannot modify their source code, but I've their names and tokens.
I thought I can create a bot who will send messages to others bots, but I can't find any info of how to obtain bot chat id.
So the question is how to obtain bot chat id to write a message to him from another bot. Or how to health check telegram bots.
Telegram bots do not receive updates from other bots, otherwise this could lead to infinite looping.
Why doesn't my bot see messages from other bots

Send message to Telegram contact or list of contacts using API

I have a Telegram account and Now I wants to import list of contacts into my Account using Telegram API.
Is This possible to send Message to my imported contacts using Telegram API, just like normal user can send message to other user in his contacts list?
I tried Telegram bots but Telegram bot can't send message to other users, unless they started any chat with Bot. So this is not that useful.
You can act as a normal user by using the Telegram MTProto API. There are many libraries that interact with that, like Python telethon or PHP MadelineProto.

Can a Telegram bot read his own messages on a channel

I'm trying to figure out why my bot is not aware of his own messages on a channel, when I use bot.get_updates() I receive only messages written by me and not by the bot.
According to the python-telegram-bot API description, getUpdates fetches the messages sent to your bot, not the messages your bot sent. So it is intended behaviour that getUpdates would not be aware of the messages sent by your bot.
As a sidenote, as stated in the Telegram Bots FAQ, Telegram bots cannot access messages sent by other bots, regardless of the settings.

Resources