W
W
WolfInChains2020-05-06 15:07:38
Python
WolfInChains, 2020-05-06 15:07:38

Error in VK API. How to fix?

There is such a code, judging by the logs (presented below), some parameter is missing, sort of like user_id, how to pull it out? And yet, what is the member_id, it is also indicated in the documentation, how to get it?

if event.object.text == "Кик":
                       vk.method("messages.removeChatUser", {"chat_id": event.object.peer_id-2000000000,
                                                             "user_id": event.obj.reply_message, "member_id": "user_id",
                                                             "random_id": random.randint(1, 2147483647)})

Logs

ApiError(, 'messages.removeChatUser', {'chat_id': 2, 'user_id': {'date': 1588762478, 'from_id': 537833179, 'text': '1', 'attachments': [], ' conversation_message_id': 16, 'peer_id': 2000001825, 'id': 3244291}, 'member_id': 'user_id', 'random_id': 1705262493, 'v': '5.92', 'access_token': 'CENSORED'}, False , {'error_code': 100, 'error_msg': 'One of the parameters specified was missing or invalid: user_id not integer', 'request_params': [{'key': 'method', 'value': 'messages.removeChatUser '}, {'key': 'oauth', 'value': '1'}, {'key': 'chat_id', 'value': '2'}, {' key': 'user_id', 'value': 'id'}, {'key': 'member_id', 'value': 'user_id'}, {'key': 'random_id', 'value': '1705262493' }, {'key': 'v', 'value': '5.92'}]})

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Miit, 2020-05-06
@WolfInChains

'error_code': 100, 'error_msg': 'One of the parameters specified was missing or invalid: user_id not integer'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question