instagram-private-api: 400 Bad Request; Please wait a few minutes before you try again.

Bug Report

Form

Requirements

Platform

  • I’m using Node.js version v16.14.2

Description

After a short period of time, when I make changes, this error occurs to me

I lost one of my Instagram accounts and whenever I tried to log in, this error was displayed Please wait a few minutes before you try again. I created a new account, the same thing happened again, but my account was not closed, but the problem is still there. I read other issues and did not see the correct solution

Code

const instagram = async () => {
  const ig = new IgApiClient();
  ig.state.generateDevice(process.env.IG_USERNAME);
  try {
    const loggedInUser = await ig.account.login(
      process.env.IG_USERNAME,
      process.env.IG_PASSWORD,
    );
  } catch (e) {
    throw e;
  }
};

Error and Output

node:internal/process/promises:279

             triggerUncaughtException(err, true /* fromPromise */);
            ^

IgResponseError: POST /api/v1/accounts/login/ - 400 Bad Request; Please wait a few minutes before you try again.
    at Request.handleResponseError (C:\Users\mmdzov\Desktop\test\insta\node_modules\instagram-private-api\dist\core\request.js:126:16)
    at Request.send (C:\Users\mmdzov\Desktop\test\insta\node_modules\instagram-private-api\dist\core\request.js:54:28)

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 23

Most upvoted comments

That depends on proxy.

Maybe you can close the issue.

It is common error. Change IP or wait 1+ hour