X
X
Xacker_Name2021-12-20 05:34:43
In contact with
Xacker_Name, 2021-12-20 05:34:43

How to get the first and last name of the user who wrote the bot on vk_api?

How to get the first and last name of the user who wrote the bot on vk_api?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
desaki, 2021-12-20
@rt2233

id = event.user_id
user_get = vk.users.get(user_ids=(id))
user_get = user_get[0]

first_name = user_get['first_name'] # Имя пользователя
last_name = user_get['last_name'] # Фамилия

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question