Skip to content

Why has the instance lost the authorization?#

Beta version

The functionality is in beta. Features may change and may also work unstably.

The instance logs out automatically when Instagram stops accepting its session. A separate call of the Logout method is not required for that.

When it happens#

The following responses of the API methods mean the loss of the authorization:

HTTP code Response text Reason
400 session is no longer valid Instagram no longer accepts the stored session
400 session was logged out The session has been ended - for example, by logging out of the account on another device
400 checkpoint required: confirm the login in the Instagram app, then log in again Instagram requires the login to be confirmed

What happens to the instance#

The consequences are the same as for the Logout method call: the session, chats, contacts and messages of the instance are deleted, the instance goes to the notAuthorized state. The stateInstanceChanged notification arrives about it.

The state of the instance when a limitation or an account block is received

Rate limits do not remove the authorization and do not change the state of the instance: it stays authorized, and only a particular kind of action is suspended.

A suspension of the whole account does not remove the session either: the instance goes to suspended, authorizing again is not needed - the restrictions are lifted in the Instagram app.

More details are in the article What types of limitations can Instagram impose?.

What to do#

  1. If the checkpoint required… response has arrived, confirm the login in the Instagram app on a device where the account is already open.
  2. Authorize the instance again by the Login method or through a browser session.
  3. Wait for the authorized state by the GetStateInstance method.