Since you start to play with private Instagram API you will definitely face different kinds of errors that Instagram backend might send back to you. You need to handle them properly to prevent the suspicious activity that can lead you to ban. In this article you will find all kinds of errors that might appear while you trying to like, get or post anything using Instagram API. Something can be also applied to Instagram web API.
All this errors may also appear in the Instagram application so since you are trying to pretend that you are a mobile app. We have collected everything in one place so you can't forget anything.
Once you prepared workflows you can handle all these errors with using your code like bricks: just run the proper function if you received the error from Instagram. If you are using a Instagram private API wrapper (e.g. from GitHub) these libraries should already have handlers for all errors, you just need to trigger the proper workflow.
All Instagram private API errors
- Challenge Required
- Checkpoint Required
- Login Required
- Consent Required
- Network Error
- Instagram Error
- Password Changed
- Account Blocked
- Username Changed
- 2FA Enabled
If you receive Instagram's
challenge_required, you need to launch your standard re-login process.
Mind that all Instagram logins should include the modern encrypted password
enc_password into the /login/ endpoint. Properly encrypted password can be decrypted only at Instagram because they use asymmetric encryption and no one except Instagram knows the Private key. That is why even your Internet provider can't get your password by just listening the traffic. To encrypt your password you would need the Instagram public key, random bytes, current timestamp and a lot of patience to properly combine all bytes into one base64 payload. If you want more information on this topic - leave the comments below and share this article.
Instagram error Checkpoint Required
checkpoint_required means that you need to click "Yes, it was me!". That usually happens when you try to login from some unusual place (for example, when your server is located in another country). Go to Instagram website or mobile app and click "It's me!". And then try to login again.
If you received the Login Required
login_required Instagram error during some actions like getting some data or sending some like, that means you was unlogged (maybe your Instagram session expired). Just try to login again and get the fresh session and cookie files.
Usually Consent Required
consent_required error happens when Instagram updated Terms and Data policy. The best way to solve that is to go to Instagram website or mobile app and click
agree. You can find the proper endpoint for that
agree button to automate it in the future. And then just try to login again as usual.
A.k.a. Curl Error, Bad response, Timeout, Server not respond. Instagram is a really huge cluster of servers which may fail sometimes. Just try to wait 2 minutes and try again.
Sometimes you can receive
instagram_error without any description. The best way is to try to relogin to Instagram again or one-click reconnect.
If you or someone changed the password you will receive Instagram error
password_changed. If it was you - just use the proper password in your script! If it wasn't - open mobile app and start the "Forgot password" workflow.
If you received Instagram error
account_blocked, you need to manually open the website or Instagram app and unblock the account. Someone automated this workflow which is really mind blowing. If you want to unblock your Instagram account, usually you can simply relogin or reinstall the app (and login again). Sometimes you just need to follow steps in mobile app. In the worst scenario you need to wait up to 7 days.
Similar to Password changed, it is really rare but if you changed your Instagram username you can't use your old username + password pair to login into your Instagram. Anyway, if you receive this error, I strongly recommend have alert system which can be used to notify you about this change. Maybe your account was stolen.
It is much easier to operate with Private Instagram API if you disable the 2FA (two factor authentication) on your Instagram account because it is hard to orchestrate bot + emails + mobile at the same time to make the whole script stable. Anyway, there are some companies that done that (including the new Instagram account creation which is really hard).
If you received this error, our advise is to go and disable the 2FA for your Instagram account to drastically simplify your scripting and automation.
We hope that you found this article useful for your projects.
More Instagram hacks and tricks you can find in this Telegram channel: @instabotproject.