GetInstances#
The method is intended for getting all instances on a partner account.
Request#
To get all instances of an account, you need to execute a GET request at:
GET
{{partnerApiUrl}}/partner/getInstances/{{partnerToken}}
Request parameters
The partnerApiUrl and partnerToken parameters are specified in the Profile section of the console.

Response#
Response fields#
| Field | Type | Description |
|---|---|---|
idInstance | integer | Account instance identifier. A uint64 value, 10 digits |
name | string | Instance name specified by the user |
typeInstance | string | The field takes the value telegram, whatsapp or v3 (for MAX) |
typeAccount | string | Not used |
messenger | string | The field takes the value telegram, whatsapp or v3 (for MAX) |
partnerUserUiid | string | Not used |
timeCreated | string | Instance creation time |
timeDeleted | string | Instance deletion time |
apiTokenInstance | string | API token of the account instance |
deleted | boolean | Flag for deleted instances, takes the values true/false |
tariff | string | Plan connected to the instance |
isFree | boolean | Flag for instances on the free plan ("Developer"), takes the values true/false |
isPartner | boolean | Flag for instances on the "Partner" plan, takes the values true/false |
expirationDate | string | Instance expiration date (partner instances are renewed automatically) |
isExpired | boolean | Flag for instances with an overdue payment, takes the values true/false |
Response body example#
[
{
"apiTokenInstance": "f4f28aef69414192bb73b878c4862891b5f0856d178644129d",
"apiUrl": "https://4100.api.green-api.com/",
"deleted": false,
"enableCalls": false,
"expirationDate": "2026-08-09T07:32:27",
"idInstance": 4100000000,
"isExpired": false,
"isFree": false,
"isPartner": false,
"mediaUrl": "https://4100.api.green-api.com/",
"messenger": "telegram",
"name": "Instance 4100000000",
"partnerUserUiid": "",
"tariff": "TELEGRAM_BUSINESS",
"timeCreated": "2024-08-07T06:53:00",
"timeDeleted": "0001-01-01T00:00:00",
"typeAccount": "",
"typeInstance": "telegram"
},
{
"apiTokenInstance": "f69414441294f28aef6891b5f0856192bb73b878c4862d178d",
"apiUrl": "https://4100.api.green-api.com/",
"deleted": false,
"enableCalls": false,
"expirationDate": "2026-08-09T07:32:27",
"idInstance": 4100000001,
"isExpired": false,
"isFree": false,
"isPartner": false,
"mediaUrl": "https://4100.api.green-api.com/",
"messenger": "telegram",
"name": "Instance 4100000001",
"partnerUserUiid": "",
"tariff": "TELEGRAM_BUSINESS",
"timeCreated": "2024-08-07T06:53:00",
"timeDeleted": "0001-01-01T00:00:00",
"typeAccount": "",
"typeInstance": "telegram"
}
]
GetInstances errors#
For the list of errors common to all methods, see the Common errors section
| HTTP code | Error identifier | Description |
|---|---|---|
| 200 | "code": 401,"description": "Unauthorized" | Authorization problem, check that partnerToken is specified correctly |
Code examples#
import requests
url = "https://api.green-api.com/partner/getInstances/{{partnerToken}}"
payload = {}
headers = {
'Content-Type': 'application/json'
}
response = requests.post(url, json=payload)
print(response.text.encode('utf8'))
curl --location --globoff 'https://api.green-api.com/partner/GetInstances/{{partnerToken}}' \
--data ''
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("https://api.green-api.com/partner/GetInstances/{{partnerToken}}")
.body("")
.asString();