if someone find my telegram chat ID (instead of my phone number or username), what can do with that?
is it dangerous?!
is it a big deal that someone can find my ID? should I worry about it?
If someone with a (user)bot wants to send you a message, they can do that via the userID only. But only if they have "seen" you. Seeing you is considering their client to receive a message from you, be it in a private message or group.
Bots can only send you a message if you have started it in a private chat, otherwise they can only send you a message in a group they share with you.
So there is no real risk of people knowing your ID.
Related
I'm writing a bot that will send the same message for many people I've ever communicated in telegram. So I need to get all my old chat_id's.
All I found is just to store chat_id when I receive a new message as here Retrieve all chat ids using Telegram bot
But it doesn't fit me. If is it possible, please tell me, I'd really apreciate it!
It's not possible, as there is no such method listed in the Bot API Docs.
I've been using a Telegram BOT to send notifications for a group, and for users.
I already know i can get Chat ID by receiving a message from the user on my bot, using getUpdates.
I also know i can get Group ID using the same method...
But what i really need is:
There is three users in my group.
My bot.
Me.
Another user that didn't sent any messages to my bot so it does not appear on getUpdates
Is it possible to get this third user his ID?
PS: I am the group owner, and also added my bot as Admin...
The third user is a normal user.
Can someone help me?
Thanks!
That's not possible with the offical Telegram Bot API
Possible Workarounds:
Hold a list of your own. If a user is joining (new_chat_member), lefting (left_chat_member), somebody is sending a message in the group, and so on. Check Message for more information.
Check if a user is a member of the group with getChatMember.
Also may be helpful: getChatMembersCount and getChatAdministrators
I sent a message using telegram bot api. The bot I'm writing is kind of private channel bot, not inline.
So I've just sent a message, 48 hours has not lasted.
I tried to use this: https://api.telegram.org/botTOKEN/deleteMessage?chat_id=CID&message_id=MID
As a result I got "Bad Request: message can't be deleted"
Why so?
In my case I'm asking user for a price. If the price is not valid, I send a notification, asking user to re-enter the price. So, there might be many service messages, asking user to correct the price. After he entered correct value I want to erase these service messages. I can't think of any other solution except removing these messages, but I couldn't manage to do this.
I'm on a telegram group of wich I'm not admin. In that particular channel, there are lots of messages and "useless" information. I want to make something so when someone in the group says a particular word, I'll get a notification (maybe a private msg?). I've searched but other answers mention the bot API, but, as far as I have found, bots can't be added to groups without being admin, not even with the invitation link. How can I access the messages of the group to process them?
As you said, bots can't get message in channel without administrator permission, and they can't join group by themselves.
If you want to get all messages in group, please disable privacy mode via /setprivacy in #BotFather, and re-invite to group.
I'm developing a bot in telegram , here is my problem:
I have some posts in my channel which some inline_keyboards are attached to them. when a user press the button , next events happen in a bot and some messages show to a user. if user has been started the bot before , there is no problem , if not I have error. how should I check the user is member of my bot or not to handle this problem???
try to use sendMessage() API and send a message to user. After that telegram will response a status tell you whether success or not.
if started bot receive receive is ok,
if not started bot receive is nothing.
{"ok":true,"result":{"message_id":9999,"from":{"id":00000000,"is_bot":true,"first_name":"mybot","username":"mybot"}}}
like that, good luck.
There is no way to check if bot can talk to user or not without send message.
You can use url with https://t.me/Bot?start=some_data format, and you will receive /start some_data, please try this link yourself.
The problem with this approach is that if a lot of users do the same, telegram starts to throttle your callbacks :( ... it would be so much easier if you could just read that information somewhere...