`preLoginFlow()`: POST .../msisdn_header_bootstrap/ - 302 Found
See original GitHub issueBug 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
DEBUG
variable.
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;
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:15 (3 by maintainers)
Top Results From Across the Web
Code working on my machine but not in hosting - Stack Overflow
preLoginFlow() await ig.account.login(USERNAME, PASSWORD) // log ... POST /api/v1/accounts/msisdn_header_bootstrap/ - 302 Found; at Request.
Read more >instagram-private-api - Bountysource
Instagram has released this new feature where you can tag a business partner in your post and it shows up as a partnership...
Read more >How To Fix the HTTP 302 Error (5 Methods) - Kinsta
In this post, we'll tell you everything you need to know about HTTP 302 errors. Then we'll share five troubleshooting tips to help...
Read more >302 Found - Evert Pot
302 Found is another misunderstood status code. ... Web frameworks will actually now default to 302 for redirects after a POST request.
Read more >rest api - Salesforce Integration with Square - 302 Found Error
Just posting the follow up as to what the issue was. We were able to solve this via @identigral's comment of setting up...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey! On my side, I’ve removed the preloginflow code (it’s not obrigatory)
What can I do about this problem? @Nerixyz