Answer the question
In order to leave comments, you need to log in
Updated vk_api and now random_id is required to send messages, why is this needed?
Traceback (most recent call last):
File "", line 93, in
vk.messages.send(peer_id= user_id, message = text)
File "C:\Program Files\Python37\lib\site-packages\vk_api\vk_api. py", line 646, in __call__
return self._vk.method(self._method, kwargs)
File "C:\Program Files\Python37\lib\site-packages\vk_api\vk_api.py", line 615, in method
raise error
vk_api.exceptions.ApiError: [100] One of the parameters specified was missing or invalid: random_id is a required parameter
def get_random_id():
return random.getrandbits(31) * random.choice([-1, 1])
Answer the question
In order to leave comments, you need to log in
https://vk.com/dev/versions
Look at version 5.90
If you don't want to specify random_id every time, install version 5.89.
And in general, they already wrote about it, including on the toaster.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question