Instagram-private-api: Cookies issue

Created on 25 Jan 2019  路  5Comments  路  Source: dilame/instagram-private-api

i just made one change, the version of this library, i updated from 0.6.8 to 0.7.0, no more change, i am talking about existing json file with intagram cookies:

var storage = new Client.CookieFileStorage(__dirname + './cookies/someuser.json');

my existing json file works with 0.6.8 version but it does not with 0.7.0

when i call any action, for example:

Client.Account.searchForUser(session, 'instagram')

with version 0.6.8 it takes my someuser.json and loads ok from cookies, but whe i use 0.7.0 it seems my someuser.json saved cookies does not work

please note that i am not making changes to my code or environment or any, i am just changing from 0.6.8 to 0.7.0

I am not using:

Client.Session.create(device, storage, user, password)

because i already have a session stored on cookies automaticaly saved, so i am using:

var storage = new Client.CookieFileStorage(__dirname + './cookies/someuser.json');
const session = new Client.Session(device, storage)

with the same some.json file created before

why using 0.6.8 version works and 0.7.0 does not works?

i am getting:
Cookie sessionid you are searching found was either not found or not valid!

Please review, thanks in advance.

All 5 comments

i am using

const PRIVATE_KEY = { SIG_KEY: '109513c04303341a7daf27bb41b268e633b30dcc65a3fe14503f743176113869', SIG_VERSION: '4', APP_VERSION: '27.0.0.7.97' }

maybe it does not validate cookies because you are using:

const PRIVATE_KEY = { SIG_KEY: 'ac5f26ee05af3e40a81b94b78d762dc8287bcdd8254fe86d0971b2aded8884a4', SIG_VERSION: '4', APP_VERSION: '64.0.0.14.96' }

The new version come with some changes of cookie, please use new fresh cookie.json file and login again. Btw, you could edit your someuser.json by move all child propertys of 'i.instagram.com' key to inside of 'instagram.com' key. It should worked fine if the edited cookie json is validated.

@duclvz Maybe replacing domain could work, i can not login again becouse a simple fact, i am not doing login with this core, i am doing well with 0.6.8 version and a valid session from other sources.

replacing i.instagram.com for instagram.com was the solution, thank you so much @duclvz

@duclvz i am still having issues, look at https://github.com/dilame/instagram-private-api/issues/462#issuecomment-461152633

Was this page helpful?
0 / 5 - 0 ratings

Related issues

350d picture 350d  路  53Comments

iMrDJAi picture iMrDJAi  路  34Comments

codingzombies picture codingzombies  路  19Comments

zalkanorr picture zalkanorr  路  12Comments

delmotte picture delmotte  路  61Comments