dilame / instagram-private-api

NodeJS Instagram private API SDK. Written in TypeScript.
MIT License
5.93k stars 1.14k forks source link

400 Bad Request; checkpoint_required #1602

Closed martymfly closed 2 years ago

martymfly commented 2 years ago

Anyone has 400 Bad Request; checkpoint_required error recently?

There is no challange required when logged in through the official app or the web app.

dmoney1908 commented 2 years ago

I've been getting the same issue for the last day

dmoney1908 commented 2 years ago

I updated my IG_APP_VERSION in the constant file which solved the error for making posts, but now I am getting an error "Invalid request options" when trying to log into an account. I am guessing it is because of the app update? Any idea on how to fix this now?

Nerixyz commented 2 years ago

I'm keeping this open since it seems like a new issue that even regular android/iOS devices with older Instagram versions are facing.

bluesealjs commented 2 years ago

I'm currently facing this issue every 2-5 API calls, it auto logs out. Saved sessions don't work, asks to login again.

Error resulting from the saved session: IgUserHasLoggedOutError: GET /api/v1/users/search/?timezone_offset=19800&q=iloveleuven&count=30 - 403 Forbidden; user_has_logged_out

Error for fresh login, after a few API calls: IgResponseError: GET /api/v1/friendships/44997008532/following/?max_id=100&order=default&query=&enable_groups=true&includes_hashtags=true - 400 Bad Request; checkpoint_required

martymfly commented 2 years ago

I'm currently facing this issue every 2-5 API calls, it auto logs out. Saved sessions don't work, asks to login again.

That's right. When I got the error first, I didn't keep trying but later on I noticed that some calls are working while some don't. But saved session works for me to keep app working.

azerpas commented 2 years ago

Same on my end, getting blocked after a few requests.

Code

if (error.message.match('checkpoint_required')) {
    console.log(ig.state.checkpoint)
    console.log(error.response.body)
    console.log(await ig.challenge.state())
    await ig.challenge.auto(true) // Requesting sms-code or click "It was me" button
    console.log(ig.state.checkpoint) // Challenge info here
    const {code} = await inquirer.prompt([
      {
        type: 'input',
        name: 'code',
        message: 'Enter code',
      },
    ])
    console.log(await ig.challenge.sendSecurityCode(code))
    throw new Error('Checkpoint required by Instagram. Please create some manual activity through your real device and restart the tool.')
} else throw new IgResponseError(error.response)

Response:

null
{
  message: 'checkpoint_required',
  checkpoint_url: 'https://i.instagram.com/privacy/checks/?privacy_flow=1&next=instagram://checkpoint/dismiss',
  lock: false,
  flow_render_type: 0,
  status: 'fail'
}
IgNoCheckpointError: No checkpoint data available
sreza78 commented 2 years ago

same issue in here, is there any updates!? :(

Chrom-Pharaoh commented 2 years ago

same issue i have it every request i do

sartorinahuel commented 2 years ago

Same here, i also checked that the API for python has the same issue reported. im facing problems with myAccount data, followings and stories.

dmoney1908 commented 2 years ago

Same here, i also checked that the API for python has the same issue reported. im facing problems with myAccount data, followings and stories.

Have you tried to update the app version in the Constant file? This fixed the checkpoint error for making posts, but when trying to log in with a new account I am getting "Invalid Request Options", maybe the endpoints changed for the login in the new app version?

Does anyone know how to update this login flow?

Chrom-Pharaoh commented 2 years ago

what version should i use?

Valew17 commented 2 years ago

Same here, i also checked that the API for python has the same issue reported. im facing problems with myAccount data, followings and stories.

Have you tried to update the app version in the Constant file? This fixed the checkpoint error for making posts, but when trying to log in with a new account I am getting "Invalid Request Options", maybe the endpoints changed for the login in the new app version?

Does anyone know how to update this login flow?

Hello! What version are you using to fix the problem?

crispmama commented 2 years ago

Same here, i also checked that the API for python has the same issue reported. im facing problems with myAccount data, followings and stories.

Have you tried to update the app version in the Constant file? This fixed the checkpoint error for making posts, but when trying to log in with a new account I am getting "Invalid Request Options", maybe the endpoints changed for the login in the new app version? Does anyone know how to update this login flow?

Hello! What version are you using to fix the problem?

in core > constants.ts I updated the app version to the following:

exports.APP_VERSION = '227.0.0.12.117'; exports.APP_VERSION_CODE = '323703830';

after the change, it seems like I no longer receive 400 Bad requests; checkpoint_required but I'm not able to login to new accounts with that version, when I try to login I get "ds_user_id" not found error and no cookies are being set.

On temporary fix could be to use the latest version for all of the activity and use the old version to login into the accounts, I'm not sure what would be the risks of doing so.

dmoney1908 commented 2 years ago

I am using version 230.0.0.16.108 and can post but cannot login

1alind commented 2 years ago

same here. started yesterday

pidgeon777 commented 2 years ago

I also have the same extremely annoying problem.

checkpoint_required error every time I try to post any API request, and it happens to the 70% of the requests, apparently randomly.

pidgeon777 commented 2 years ago

On temporary fix could be to use the latest version for all of the activity and use the old version to login into the accounts, I'm not sure what would be the risks of doing so.

It would be interesting to know if this workaround could lead to some risks or not.

ripupo88 commented 2 years ago

My error

IgResponseError: POST /api/v1/launcher/sync/ - 400 Bad Request; checkpoint_required

Version

"instagram-private-api": "^1.36.1",
"instagram_mqtt": "github:Nerixyz/instagram_mqtt",
"mqtts": "^1.5.0",
dmoney1908 commented 2 years ago

Instagram seems to have corrected this bug, it is working fine for me now. Anyone else?

sartorinahuel commented 2 years ago

Yeap, it seems to work fine.

martymfly commented 2 years ago

It's working fine for me too since last night. I wanted to make sure that it wasn't a temporary fix so I waited for a while to confirm.

pidgeon777 commented 2 years ago

I also confirm it is now working again with no checkpoint_required error.

ghost commented 2 years ago

i am facing the same error here, you think is from instagram againe ?

JorisOpsommer commented 2 years ago

Also having the same problem here since today

OdapX commented 2 years ago

I have the same problem any fix ???