Login problem : 400 Bad Request
See original GitHub issueForm
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
YOUR_VERSION (node -v)
- I’m using electron
- I’m using the browser
YOUR_BROWSER_AND_VERSION
- I’m using some other environment
YOUR_ENV
Description
Hi, I’ve issue.I failed to login and never happend before. When I debug logs tell “Please wait a few minutes before you try again”. But I retry after +6 hours
Code
async function login(username, password) {
ig.state.generateDevice(username);
await ig.simulate.preLoginFlow();
spinner.start({ text: 'Media found...' });
const loginProcess = await ig.account
.login(username, password)
.catch((err) => {
console.log('ERROR : ', err);
});
if (loginProcess.pk) {
spinner.succeed('Logged');
}
return loginProcess;
}
const loginStatus = await login(usernameIg, passwordIg);
Error and Output
ig:request Requesting POST /api/v1/accounts/msisdn_header_bootstrap/ +0ms
ig:request Requesting GET /api/v1/zr/token/result/ +468ms
ig:request Requesting POST /api/v1/accounts/get_prefill_candidates/ +428ms
ig:request Request POST /api/v1/accounts/get_prefill_candidates/ failed: {"message":"Please wait a few minutes before you try again.","status":"fail"} +407ms
ig:state Could not find ds_user_id +0ms
ig:request Requesting POST /api/v1/qe/sync/ +5ms
ig:request Requesting POST /api/v1/accounts/contact_point_prefill/ +462ms
ig:request Request POST /api/v1/accounts/contact_point_prefill/ failed: {"message":"Please wait a few minutes before you try again.","status":"fail"} +459ms
ig:request Requesting POST /api/v1/attribution/log_attribution/ +5ms
ig:request Request POST /api/v1/attribution/log_attribution/ failed: {"message":"error logging attribution","status":"fail"} +557ms
IgResponseError: POST /api/v1/attribution/log_attribution/ - 400 Bad Request; error logging attribution
at Request.handleResponseError (/Users/vinzlee/Documents/Node/Uploader/node_modules/instagram-private-api/dist/core/request.js:125:16)
at Request.send (/Users/vinzlee/Documents/Node/Uploader/node_modules/instagram-private-api/dist/core/request.js:53:28)
at async AttributionRepository.logAttribution (/Users/vinzlee/Documents/Node/Uploader/node_modules/instagram-private-api/dist/repositories/attribution.repository.js:6:26)
Issue Analytics
- State:
- Created 2 years ago
- Comments:10
Top Results From Across the Web
How to Fix a 400 Bad Request Error (Causes and Fixes) - Kinsta
The 400 (Bad Request) status code indicates that the server cannot or will not process the request due to something that is perceived...
Read more >How to Fix a 400 Bad Request Error: 8 Easy Methods
The 400 bad request error is an HTTP status code that describes an error caused by an invalid request. Thus, the server can't...
Read more >What is a 400 Bad Request Error (and How Can I Fix It)?
A 400 Bad Request Error occurs when a request sent to the website server is incorrect or corrupt, and the server receiving the...
Read more >How to Fix the 400 Bad Request Error - Lifewire
The 400 Bad Request error means that the request you sent to the website server to view the page was somehow incorrect.
Read more >HTTP Error 400 Bad Request: What It Is and How to Fix It
The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request due...
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
I removed this line and code working now
await ig.simulate.preLoginFlow();
Wow. Thanks for letting me know.
On Wed, Jun 30, 2021, 4:53 PM Hailov Igor @.***> wrote: