I
I
Igor Agarkov2018-05-13 18:25:07
In contact with
Igor Agarkov, 2018-05-13 18:25:07

VK api now asks for a token even in order to get a person's avatar?

I'm trying to get my own avatar like this:

https://api.vk.com/method/users.get?fields=photo_200&user_ids=199334161

I get this:
{"error":{"error_code":5,"error_msg":"User authorization failed: no access_token passed.","request_params":[{"key":"oauth","value":"1"},{"key":"method","value":"users.get"},{"key":"fields","value":"photo_200"},{"key":"user_ids","value":"199334161"}]}}

As for me, it looks crazy, especially considering that the description of the method says that the token can be used, but not necessary. What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Serezha, 2018-05-13
@id01

https://vk.com/dev/service_token
From April 2017, a service access token is required to work with these methods (not including secure section methods):
newsfeed.search
wall.search
From May 2018, a service access token is required to work with these methods:
users.get
wall.getComments
friends.get
groups.getMembers
likes.getList

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question