Skip to content

GetStateInstance#

Beta version

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

The method returns the authorization state of an Instagram account on an instance.

The method uses the limits on the number of requests per second.

Request#

To get the instance state, you have to execute a request at:

GET
{{apiUrl}}/waInstance{{idInstance}}/getStateInstance/{{apiTokenInstance}}

For apiUrl, idInstance and apiTokenInstance request parameters, refer to the Before you start section.

Response#

Response parameters#

Field Type Description
stateInstance string The instance state. Takes the values:
notAuthorized - The instance is not authorized.
authorized - The instance is authorized and is ready to work
starting - The instance is in the starting process (service mode).
The instance or the server is being rebooted, or the instance is in the maintenance mode.
It may take up to 5 minutes for the instance state to change to authorized.
suspended - Instagram has suspended the account.
See What types of limitations can Instagram impose? for the details

Response body example#

{
    "stateInstance": "authorized"
}

GetStateInstance errors#

For a list of errors common to all methods, refer to the Common errors section

HTTP code Error ID Description
200 The instance has been in the starting state for a long time (more than 5 minutes) 1. Reboot the instance by the Reboot method
2. Contact the technical support

Request examples#

import requests

url = "{{apiUrl}}/waInstance{{idInstance}}/getStateInstance/{{apiTokenInstance}}"

response = requests.get(url)

print(response.text.encode('utf8'))
<?php
$url = '{{apiUrl}}/waInstance{{idInstance}}/getStateInstance/{{apiTokenInstance}}';

echo file_get_contents($url);
?>
curl --location '{{apiUrl}}/waInstance{{idInstance}}/getStateInstance/{{apiTokenInstance}}'