How to make a private Telegram bot accessible only by its owner?

There is nothing you can do with BotFather. the only way is to check it inside your code.


You can do this in setting, you need to check by yourself, just exit program if .message.from.id not equal to yours.

You can disable join group via /setjoingroup, but you can't invite bot to group either.


You can check for the chat id (9 digit number) in your code.

For example, if you use this wrapper to create bot, you can use update.message.chat_id to get chat id. You can also check for the first name (update.message.from_user.first_name) and last name (update.message.from_user.last_name).