Closed LexSerest closed 4 years ago
solution:
(async () => {
const ig = new IgApiClient();
ig.state.generateDevice(process.env.IG_USERNAME)
Bluebird.try(async () => {
const auth = await ig.account.login(process.env.IG_USERNAME, process.env.IG_PASSWORD);
}).catch(IgCheckpointError, async () => {
// why not use auto? he sends 3 messages
await ig.challenge.selectVerifyMethod('0'); // use sms
// verify code
await ig.challenge.sendSecurityCode(code);
// ...waiting for the second message from instagram...
Bluebird.try(async () => {
await ig.account.login(process.env.IG_USERNAME, process.env.IG_PASSWORD);
}).catch(IgLoginTwoFactorRequiredError, (e) => {
const two_factor_identifier = e.response.body.two_factor_info.two_factor_identifier;
const verificationCode = "<in second message>"
await ig.account.twoFactorLogin(...);
})
});
})();
Hello My account use 2fa authentication In checkPoint when sending code
var result = await ig.challenge.sendSecurityCode (code)
in response -{"action":"close","status":"ok"}
And again comes sms And the logged_in_user field stays undefined.In IgCheckpointError response.body
response in challenge.auto(true)
Who knows how to solve this problem?