I
I
Ilya2017-09-27 04:41:19
PHP
Ilya, 2017-09-27 04:41:19

Getting messages with messages.get vk api?

Trying to get the text of the last message.. What am I doing wrong?

$messageInfo = json_decode(file_get_contents("https://api.vk.com/method/messages.get?count=1&time_offset=30&v=5.68"));
$body = $messageInfo->response[0]->items.body;

Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jeffrey, 2017-09-27
@ilushkeens

User authorization failed: no access_token passed.
You do not pass the token in the request

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question