L
L
Larry Greenwood2021-09-04 22:37:33
Python
Larry Greenwood, 2021-09-04 22:37:33

How to find out information about a telegram bot through a Python token?

Yo, I would like to find out how you can find out information about the bot only by the token through python, the desired modules are telebot//aiogram

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Ruslan Mandzyuk, 2021-09-05
@DarkWitch-666

import requests

TOKEN = ""

get_bot = requests.get(f'https://api.telegram.org/bot{TOKEN}/getMe')

print(get_bot.json())

S
shurshur, 2021-09-05
@shurshur

You don't need any modules for this.
https://api.telegram.org/bot{token}/getMe _ _

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question