dilame / instagram-private-api

NodeJS Instagram private API SDK. Written in TypeScript.
MIT License
5.93k stars 1.14k forks source link

Your version of Instagram is out of date #391

Closed jcmidia closed 6 years ago

jcmidia commented 6 years ago

Hi all,

I'm trying to upload a video, but it is giving the following error: Unhandled rejection RequestError: Your version of Instagram is out of date. Please upgrade your app to log in to Instagram. It seems that I have to update the Key. Does someone have the latest one?

Thanks

IvanMMM commented 6 years ago

Yes. but problem is you can't just update the key and hope everything will be ok. You will need to update requests too. That's what we will be doing for some time. And btw, my video uploads are working fine.

jcmidia commented 6 years ago

@IvanMMM hmmm actually now I cannot even login and start a session. What key and version are you using now? Could you share with me? Is it the same one in the last code version?

IvanMMM commented 6 years ago

Yes. Master branch is working fine for me

jcmidia commented 6 years ago

Ok, thanks @IvanMMM I still cannot start a session. I'm testing the basic example below and it gives the same error. I tried with other keys, for newest versions, and it keeps not working :/

var Client = require('instagram-private-api').V1;
var device = new Client.Device('someuser');
var storage = new Client.CookieFileStorage(__dirname + './cookies/someuser.json');

// And go for login
Client.Session.create(device, storage, 'someuser', 'somepassword')
    .then(function(session) {
        // Now you have a session, we can follow / unfollow, anything...
        // And we want to follow Instagram official profile
        return [session, Client.Account.searchForUser(session, 'instagram')]   
    })
    .spread(function(session, account) {
        return Client.Relationship.create(session, account.id);
    })
    .then(function(relationship) {
        console.log(relationship.params)
        // {followedBy: ... , following: ... }
        // Yey, you just followed @instagram
    })
jcmidia commented 6 years ago

The problem is that other packages dependencies like request were outdated. I update all the packages and now it is working fine. Thanks for the support.