instagram-private-api: `preLoginFlow()`: POST .../msisdn_header_bootstrap/ - 302 Found
Bug Report
Form
Requirements
- I’ve searched the Issues
- I’ve read the basic concepts
- I’m using the latest version
- I’ve debugged my code using the
DEBUGvariable.
Platform
- I’m using Node.js version
15.8.0
Description
When I run my app, the login method (see below) is executed. Unfortunately, this fails with the error POST /api/v1/accounts/msisdn_header_bootstrap/ - 302 Found.
To find the problematic part in my code, I attached catch statements to the respective method calls. As it turned out, it is the method preLoginFlow() that throws the said error.
Code
async function login(username, password) {
try {
await ig.simulate.preLoginFlow();
await ig.account.login(username, password);
process.nextTick(() => ig.simulate.postLoginFlow());
return true;
} catch (error) {
console.error('login =>', error.message);
return false;
}
}
Error and Output
> DEBUG='ig:*' node server.js
{"level": "info", "timestamp": "2021-04-23T06:25:21.796Z", "message": "Api running on port 3001"}
ig:request Requesting POST /api/v1/attribution/log_attribution/ +0ms
ig:request Requesting POST /api/v1/launcher/sync/ +2s
ig:request Requesting POST /api/v1/accounts/read_msisdn_header/ +317ms
ig:state Could not find ds_user_id +0ms
ig:request Requesting POST /api/v1/qe/sync/ +458ms
ig:request Requesting POST /api/v1/accounts/msisdn_header_bootstrap/ +461ms
ig:request Request POST /api/v1/accounts/msisdn_header_bootstrap/ failed: +433ms
login => POST /api/v1/accounts/msisdn_header_bootstrap/ - 302 Found;
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 6
- Comments: 15 (3 by maintainers)
Commits related to this issue
- fix(route): allow preLoginFlow of instagram to fail Based on discussion in instragram-private-api repo, we do not need this function for login. See: https://github.com/dilame/instagram-private-api/i... — committed to shizunge/RSSHub by shizunge 3 years ago
- fix(route): allow preLoginFlow of instagram to fail (#8340) Based on discussion in instragram-private-api repo, we do not need this function for login. See: https://github.com/dilame/instagram-p... — committed to DIYgod/RSSHub by shizunge 3 years ago
- Squashed commit of the following: commit a43b67bc1f6d04519c09ac04f3fce4c9e074381a Author: DIYgod <i@diygod.me> Date: Fri Nov 19 22:11:38 2021 +0000 fix: douban guid commit 53f6347189eff8b6c66... — committed to kwafok/RSSHub-1 by kwafok 3 years ago
- [pull] master from DIYgod:master (#76) * docs: update sponsor * feat: add hotukdeals * feat: hotukdeals radar * feat: add PS5 stock UK - The Independent * fix(route): allow preLoginFlow o... — committed to auto-bot-ty/RSSHub by pull[bot] 3 years ago
Hey! On my side, I’ve removed the preloginflow code (it’s not obrigatory)
What can I do about this problem? @Nerixyz
Just started getting this out of no where too. Nothing changed to my code.
Just started getting this error again today