M
M
Mikhail Muntyan2020-09-03 07:34:20
Python
Mikhail Muntyan, 2020-09-03 07:34:20

How to pull data from messages.getHistory method?

Hello, I can’t figure out how to get data from the vk api - messages.getHistory (vk.com/dev/messages.getHistory) method, to be more precise, the id and text of the message.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Timur Pokrovsky, 2020-09-03
@limontasher

At the bottom of the page , you can run a test query, this is what it returned:

{
    "response": {
        "count": 54,
        "items": [{
            "date": 1599111439,
            "from_id": 183579474,
            "id": 2190425,
            "out": 1,
            "peer_id": 183579474,
            "text": "тест",
            "conversation_message_id": 54,
            "fwd_messages": [],
            "important": false,
            "random_id": 1859802973,
            "attachments": [],
            "is_hidden": false
        }]
    }
}

That is something like
json['response']['items']['id']

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question