CallsLogout#
Temporary limitations
The Ultra plan, for unlimited calls, can only be connected for new instances. For questions about connecting to the plan and additional conditions, please write to the GREEN-API technical support or to the chat on the website.
At the moment only individual calls are available.
The method is used to log out the calls instance.
Request#
To log out the calls instance, you have to execute a request at:
POST
{{apiUrl}}/waInstance{{idInstance}}/callsLogout/{{apiTokenInstance}}
For apiUrl, idInstance and apiTokenInstance request parameters, refer to Before you start section.
Response#
Response parameters#
| Parameter | Type | Description |
|---|---|---|
isLogout | boolean | Instance logout result |
Response body example#
{
"isLogout": true
}
Errors#
For a list of errors common to all methods, refer to Common errors section
| HTTP code | Description |
|---|---|
| 400 | Calls agent error |
| 404 | Instance not found |
| 500 | Log out error: ... — an error occurred during logout |
Request examples#
import requests
url = "{{apiUrl}}/waInstance{{idInstance}}/callsLogout/{{apiTokenInstance}}"
payload = {}
headers = {}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text.encode('utf8'))
curl --location --request POST '{{apiUrl}}/waInstance{{idInstance}}/callsLogout/{{apiTokenInstance}}'
var restTemplate = new RestTemplate();
var requestUrl = new StringBuilder();
requestUrl
.append({{apiUrl}})
.append("/waInstance").append({{idInstance}})
.append("/callsLogout/")
.append({{apiTokenInstance}});
var response = restTemplate.exchange(requestUrl.toString(), HttpMethod.POST, null, String.class);
System.out.println(response);
var requestUrl = new StringBuilder();
requestUrl
.append({{apiUrl}})
.append("/waInstance").append({{idInstance}})
.append("/callsLogout/")
.append({{apiTokenInstance}});
var response = Unirest.post(requestUrl.toString())
.header("Content-Type", "application/json")
.asString();
System.out.println(response);