justdmitry / NetTelegramBotApi

C# client library for building Telegram bot
MIT License
74 stars 28 forks source link

Send message with phone number #26

Closed hanigamini closed 9 years ago

hanigamini commented 9 years ago

Hi, Do you know how to send message in telegram with phone number or username ?

justdmitry commented 9 years ago

Yes, I know. There is no such option.

Here is my question to bot support in June (when API appeared):

How can bot search for user (Contact / user_id) by already known phone_number?

And the answer was:

There are many potential features to consider and implement. We'll be studying what people do with their bots for a while to see which directions will be most important for the platform.

So, now you can only send messages only to users who 'started' conversation with you bot. Even if you obtain new user_id from somewhere (for example existing user sends Contact to bot) - you can't talk with this user "without his permission".

hanigamini commented 9 years ago

So how advertising messages sent to me ? A number of sites that have panels that is possible to send a message telegram with phone number or region ?!!!

justdmitry commented 9 years ago

Are you sure that messages are sent from bot accounts? May be this is "regular phone" accounts, but bot-controlled?

hanigamini commented 9 years ago

It is "regular phone" accounts. how to send message with regular phone with c#?

justdmitry commented 9 years ago

You need to implement Telegram protocol.

AFAIK, there is no complete c# library for this in opensource.

hanigamini commented 9 years ago

Thanks :+1: