Answer the question
In order to leave comments, you need to log in
Why does VK api return an error Error 5: User authorization failed: no access_token passed?
https://api.vk.com/method/friends.get?user_id=babegone
{"error":{"error_code":5,"error_msg":"User authorization failed: no access_token passed.","request_params":[{"key":"oauth","value":"1"},{"key":"method","value":"friends.get"},{"key":"user_id","value":"babegone"}]}}
Answer the question
In order to leave comments, you need to log in
It is worth familiarizing yourself with the VKontakte API in their article.
Your error message unequivocally indicates its cause: User authorization failed: no access_token passed.
- do not authorize the user making the request due to the lack of an access_token (access key).
To execute friends.get() , you need a key ("access_token") or a service key - from the settings of the VK Application you created; or user - received as a result of the user authorization dialog.
It has also become mandatory to indicate the API version used, the v
. Now the current version 5.74
To just try, create an application of type standaloneand copy the Service Key value from its Settings:
https://api.vk.com/method/friends.get?user_id=babegone&v=5.74&access_token=supersecretsupersecret
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question