Answer the question
In order to leave comments, you need to log in
API request not sent. What to do?
Hello!
I wrote a small code, to send messages via conversations via the VK API and via the requests
chat_id library, I take the following method
id = 0 #Переменная для chat_id
number = 0 #Что бы чекать какой цикл
while True:
s = requests.Session()
params = {
'chat_id': id,
'message': msg, #переменная с сообщением
'access_token': token, #токен
'random_id': 0,
'v': 5.122
}
s.post('https://api.vk.com/method/messages.send', params=params)
id += 1
number += 1
print("Число циклов: " + str(number))
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question