Answer the question
In order to leave comments, you need to log in
How can a Telegram bot check if a user has blocked the bot or not?
The point is.
About 4000 people used my bot, I wanted to do a small mailing with my channel and from the site of articles (+ the command to send off and on - so that a person can disconnect from the mailing), if he does not need to.
I came across a 403 error, the bottom line is that I send it to people who have already blocked my bot. How do you know if he's blocked or not? After all, I want to send it to others, but it falls at the beginning.
Answer the question
In order to leave comments, you need to log in
If you get a 403 error, then it means blocked. Mark this user as inactive in the database and move on to the next user.
How to handle errors depends on your programming language.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question