P
P
Pavel2019-01-26 21:14:58
Python
Pavel, 2019-01-26 21:14:58

How to get username?

How to get the username and assign it to a variable. The request library is included, but when I write response, he does not see it. I know to use the users.get method but I don't know how to use it in python. when sending a message, I have vk.method("messages.send", {...}) , but with users.get I don't know how

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vadim Apenko, 2019-01-26
@k4m454k

So here is your example in the API documentation
5c4cc4afcb5d7763035971.jpeg

G
Gaggs, 2020-01-02
@Gaggs

def get_user_info(user_id):
    return vk.method('users.get', {'user_ids': user_id})

Regarding what is in the question

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question