After login(username, password) I get an email with code
Now i can try update challenge:
static async challenge(username, password, code){
const cookieStore = new FileCookieStore(`/path_here/${username}.json`);
const client = new Instagram({ username, password, cookieStore });
try {
let challengeUrl = this.challenges[username];
console.log(challengeUrl); // here link like /challenge/1623843519/Sz6xLG84Th/
console.log("code " + code); // here code from email like 604861
await client.updateChallenge({ challengeUrl, securityCode: code });
} catch(e){
console.log(e.error);
}
}
When i call challenge(username, password, code) i getting error with HTML:
<!DOCTYPE html>
Page Not Found • Instagram
(looks like default 404 page)
Also i can open link "instagram.com" + challengeUrl and it its valid page with code form
What i doing wrong?
P.S. Sorry for bad English
I have problem with
updateChallenge
My code:
After
login(username, password)
I get an email with codeNow i can try update challenge:
When i call
challenge(username, password, code)
i getting error with HTML:<!DOCTYPE html>