totemstech/instagram-node

Does not work with access_token

Closed this issue · 1 comments

2byte commented

Simple example from doc.

var ig = require('instagram-node').instagram({});

// Api access tokens
var accessTokens = [
    'd217de8c2728441dadf81e308ce****d3a',
    'cd8024a3fd6e4718abdf2e8f8***6ca',
    '66e8765c5a594e84972e3***82bdf6b',
    '3b0286915f864165bc25***309e9f39'
];

ig.use({
    access_token: accessTokens[_.random(0, accessTokens.length-1)]
});


ig.tag_media_recent('spb', function(err, medias, pagination, remaining, limit) {
    if (err) throw err;

    console.log(medias);
});

Error: OAuthAccessTokenException: The access_token provided is invalid.
My access tokens 100% working

n1t0 commented

Hey @2byte. Actually your tokens should look like this: xxxxxxxx.xxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxx. ie: 3 parts, joined by dots.
This is working well on my side.