Z
Z
zetK2016-11-23 09:53:34
Python
zetK, 2016-11-23 09:53:34

VK API how to get additional information about the user?

Good afternoon, I don’t understand how to get additional information about a user in VK in python

import vk
...
def main():
    access_token, _ = get_saved_auth_params()
    if not access_token or not _:
        access_token, _ = get_auth_params()
    api = get_api(access_token)
    users = [1,2,3]
    for user_id in users:
        profiles = api.users.get(user_ids=user_id)
        print(profiles)

how to set a list of fields uid, first_name, last_name, nickname, sex, bdate (birthdate), city, country, timezone, photo, photo_medium, photo_big, photo_rec, connections

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
IliaMir, 2016-11-27
@IliaMir

In parameters when calling api.users.get:
profiles = api.users.get(user_ids=user_id, fields = 'first_name, last_name')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question