Answer the question
In order to leave comments, you need to log in
Messages.getConservations not working?
I am writing a bot in python and VK_api, I wrote the code according to the YouTube tutorial. It doesn’t work for me, but in the video it’s the other way around (I checked it many times). Line seven "vk.method('message.getConservations', values)" throws this error: vk_api.exceptions.ApiError: [5] User authorization failed: method is unavailable with group auth.
Code:
import vk_api
import time
vk = vk_api.VkApi(token='e9ae13d9f7...')
vk._auth_token()
values = {'out': 0, 'count': 100, 'time_offset': 60}
vk.method ('messages.getConservations', values)
def write_msg(user_id, s):
vk.method('messages.send', {'user_id':user_id, 'messages':s})
while True:
response = vk.method( '
if response['items']:
values['last_message_id'] = response['items'][0]['id']
for item in response['items']:
write_msg(item['user_id'], 'Hello , artist!')
time.sleep(1)
Answer the question
In order to leave comments, you need to log in
the method is called differently: getConversations()
("v" and "s" swap places)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question