M
M
Magzhan Birgebayuly2018-02-01 09:35:48
Classmates
Magzhan Birgebayuly, 2018-02-01 09:35:48

How to get contacts (email, phone and country) of a user using OK.ru API?

Good afternoon.
I created an application, wrote a CURL request in PHP to pull up the name of authorized users, but I also need the contact details of users. What needs to be added for this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stepan, 2018-02-05
@henhanshi

Use the users.getInfo method .
In the uids parameter, pass an array of authorized user IDs ( not names, but uid! ).
In the fields parameter - a string of required parameters "EMAIL,PHONE,LOCATION".
But remember that situations may arise in which the user did not specify some parameters, in which case you can additionally request the "HAS_EMAIL" parameter. Or the user must grant additional permissions to receive this data.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question