O
O
onlinejunior2020-05-18 10:16:02
API
onlinejunior, 2020-05-18 10:16:02

How to pass ID sets to vkapi?

Request:

https://api.vk.com/method/users.get?user_id=1,2&v=5.103&access_token=*****

Answer:
{"error":{"error_code":100,"error_msg":"One of the parameters specified was missing or invalid: user_id not integer","request_params":[{"key":"user_id","value":"1,2"},{"key":"v","value":"5.103"},{"key":"method","value":"users.get"},{"key":"oauth","value":"1"}]}}


With the transfer of one ID, everything is fine.

I read docks:

user_ids - the identifiers of users listed through a comma or their short names (screen_name). By default, the ID of the current user. comma separated
list of words

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene Chefranov, 2020-05-18
@onlinejunior

Use user_id, and write user_id s just below

H
HemulGM, 2020-05-18
@HemulGM

https://api.vk.com/method/users.get?user_id=1,2&v=5.103&access_token=*****

"user_id s "
user_ids - comma-separated user IDs or their short names (screen_name).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question