Answer the question
In order to leave comments, you need to log in
How to change password via vk_api?
I'm a newbie, I don't understand where the error is in the code,
please tell me)
import vk_api
login = ‘логин’
password = ‘пароль’
old_password = password
new_password = ‘новый пароль’
vk_session = vk_api.VkApi(login, password)
vk_session.auth()
vk = vk_session.get_api()
vk.account.changePassword(old_password, new_password)
Answer the question
In order to leave comments, you need to log in
There are 17 usage examples on github: https://github.com/python273/vk_api/tree/master/ex...
Accordingly, you need to pass the necessary parameters to the function: https://vk.com/dev/account.changePassword
vk.account.changePassword(old_password=old_password, new_password=new_password)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question