S
S
SideWest2019-06-19 21:12:54
JavaScript
SideWest, 2019-06-19 21:12:54

Why does the POST request not want to be sent?

I tried several libraries, but none of them gave results,
I try this one:

var needle = require('needle');

needle.post('https://api.vk.com/method/newsfeed.get', {access_token: '123467',
          v : '5.95',
          count: 1},
    function(err, resp, body){
        console.log(body);
});

But the answer is about the same:
error_msg: 'User authorization failed: invalid access_token (4).',

Please tell me what's the matter? Why are parameters not being passed? (I checked the token, working (no, no 12345))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Kudryavtsev, 2019-06-19
@Deissh

Because VK is waiting for query params, not post body

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question