A
A
aab1372019-07-29 06:26:13
Python
aab137, 2019-07-29 06:26:13

What's wrong with getting an application token?

I did everything according to the documentation, entered

https://oauth.vk.com/authorize?client_id=********&redirect_uri=https://oauth.vk.com/blank.html&scope=friends,offline,groups,notifications&type=token

got
https://oauth.vk.com/blank.html#code=что-то_там
thought that the token is "something_there
"
session = vk.Session(access_token='что-то_там')
api = vk.API(session)
print(api)
print(api.friends.get())

got an error
vk.exceptions.VkAPIError: 5. User authorization failed: invalid access_token (4).. request_params = {'method': 'friends.get', 'oauth': '1'}

What is wrong and what to do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stockholm Syndrome, 2019-07-29
@aab137

&type=token
replace with response_type=token

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question