Skip to content

How to authorize an instance through a browser extension#

Beta version

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

This article describes how to authorize an Instagram instance with a browser extension: what you need for it, in which order to act and how to check that the instance is authorized.

  1. What the authorization through a browser extension is
  2. What you need
  3. The order of the steps
  4. If the authorization has not been completed

1. What the authorization through a browser extension is#

An Instagram instance is authorized in one of two ways:

  • by a login and a password - with the Login method,
  • through a browser extension - the instance goes on working with the Instagram session that is open in your browser.

With the second way the password of the account is not passed to GREEN-API: the extension passes the data of the session that is already open. Logging in - including the login confirmation if Instagram asks for it - is done at instagram.com, as in the regular work with the site.

The limitations of this authorization

After the authorization through the extension a part of the API methods is unavailable or works with limitations - the list is in the API features with the browser session authorization article. The authorization with the Login method opens all the methods.

2. What you need#

  • The Google Chrome browser or another Chromium-based browser that supports Chrome extensions;
  • the installed and enabled GREEN-API Instagram Connector extension;
  • an Instagram account you can log in to at instagram.com: the password and the access to the login confirmation if Instagram asks for it;
  • an Instagram instance in your personal account.

The extension works with the Instagram pages and the GREEN-API personal account pages only: it reads the data of the session in the browser and passes it to your instance.

3. The order of the steps#

  1. Make sure the GREEN-API Instagram Connector extension is enabled in the browser - in the extensions section of the browser;
  2. in your personal account, on the page of the instance, choose the authorization through a browser extension;
  3. the extension opens an Instagram window:

    • if the account is already open in the browser, the extension offers to go on with this session or to log in to another account;
    • if the account is not open, log in to it: enter the password and, if Instagram asks for it, confirm the login with a code;
  4. wait for the completion: the extension passes the data of the session to the instance itself and the Instagram window closes. About 10 minutes are given for logging in;

  5. check the result with the GetStateInstance method: the authorized state means that the instance is authorized and is ready to work.

The stateInstanceChanged notification arrives about the state change if the stateWebhook setting is enabled.

4. If the authorization has not been completed#

  • The Instagram window was closed before the completion or logging in took longer than the given time - start the authorization in your personal account again: every authorization is started separately, the previous one cannot be reused.
  • Instagram asked for the login confirmation and it could not be confirmed - log in to the account at instagram.com in the browser, wait until the feed opens and repeat the authorization.
  • The instance is still in the notAuthorized state - repeat the authorization. If the instance lost the authorization after a successful login, the reasons are described in the Why has the instance lost the authorization? article.
  • You need the methods that are unavailable with this authorization - finish the session with the Logout method and authorize the instance with the Login method.