N
N
Nikita Nikitin2018-07-03 19:55:44
Android
Nikita Nikitin, 2018-07-03 19:55:44

Why does messages.getHistory give an error when trying to pass "peer_id"?

Java, Android Studio
Code:

VKRequest request = new VKRequest("messages.getHistory", VKParameters.from("peer_id", id, VKApiConst.COUNT, 100,VKApiConst.VERSION,"5.65"));

Error:
One of the parameters specified was missing or invalid: user_id is undefined.
Comments:
It is required to get the history of messages from the conversation (multi-chat).
I tried to install the latest versions of vkapi instead of 5.65, I tried to pass it as a number, not as a string.
Obviously, the user_id does not need to be passed in our case, because judging by the documentation it is possible not to transfer user_id, in the presence of peer_id.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question