400 Bad Request; Login Error...
See original GitHub issuePlatform
- [x ] I’m using Node.js version
14
Description
When I want to login, I got this error. How can I fix that
Code
const client = new IgApiClient();
const username = 'username';
const password = 'password';
client.state.generateDevice(username)
try {
const loggedInAccount = await client.account.login(username, password);
await client.simulate.postLoginFlow();
const cu = await client.account.currentUser();
console.log({
'prfile': cu,
})
} catch (e) {
console.log(e)
}
Error and Output
{
error: IgResponseError: POST /api/v1/qp/batch_fetch/ - 400 Bad Request; FAILURE
at Request.handleResponseError (C:\Users\Administrator\Desktop\node_ig\instagram-private-api\dist\core\request.js:125:16)
at Request.send (C:\Users\Administrator\Desktop\node_ig\instagram-private-api\dist\core\request.js:53:28)
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:9
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 >400 Bad Request Error: What It Is and How to Fix It
The 400 Bad Request Error is an HTTP response status code indicating that the server was unable to process the request sent by...
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
await client.simulate.postLoginFlow();
Removing this line worked for me and won’t have any other effects.You should send request as http2 instead of http. For me this is working