Answer the question
In order to leave comments, you need to log in
Authorization through vk-api does not work?
I'm trying to log in through the vk-api library, but it gives an error:
in _api_login
raise AuthError('API auth error (no login cookies)')
vk_api.exceptions.AuthError: API auth error (no login cookies)
Code below:
import vk_api
vk_session = vk_api.VkApi('+7999999999, '*****')
vk_session.auth()
vk = vk_session.get_api()
print(vk.wall.post(message='Hello world!'))
Answer the question
In order to leave comments, you need to log in
No wonder, this is not an official authorization option. Officially, you can not log in with a number and password.
I do not recommend you to use such authorization. It is not safe, not stable and there is no guarantee that it will work even after a week.
Why invent a crutch? And there is no such method of official authorization. Maybe there is through capturing cookies with requests, but this is difficult. It's easier to do it with a user token.
import vk_api
vkApiSession= vk_api.VkApi(token="ключ апи")
vkU = vkApiSession.get_api()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question