Closed RodrigoSKohl closed 1 week ago
I can confirm this and this doesn't happen after I remove the post login flow execution in my case:
import { IgApiClient } from 'instagram-private-api'
import dotenv from "dotenv";
dotenv.config();
const ig = new IgApiClient();
ig.state.generateDevice(process.env.IG_USERNAME);
(async () => {
await ig.simulate.preLoginFlow();
const loggedInUser = await ig.account.login(process.env.IG_USERNAME, process.env.IG_PASSWORD);
// process.nextTick(async () => await ig.simulate.postLoginFlow());
const userFeed = ig.feed.user(loggedInUser.pk);
const myPostsFirstPage = await userFeed.items();;
console.log(myPostsFirstPage[0])
})();
Same here. Removing the ig.simulate.postLoginFlow() removed the error for me but I worry that may end up having other side effects / increasing likelihood of bot detection.
Yes, that does cause other side effects. The API becomes pretty unusable after removing that.
The prelogin /post login flows are outdated. You don't need to use
I am getting this error after pos-login, I can get around this by commenting out the lines
the problem is that when doing this, when sending some messages through the API my account receives a 3 day restriction on sending messages