GetDeviceInfo#
The method is aimed for getting information about the device (phone) running WhatsApp Business application.
Request#
To get device info, you have to execute a request at:
GET
{{apiUrl}}/waInstance{{idInstance}}/getDeviceInfo/{{apiTokenInstance}}
For apiUrl
, idInstance
and apiTokenInstance
request parameters, refer to Before you start section.
Response#
Response parameters#
Parameter | Type | Description |
---|---|---|
platform | string | Operating system of the device running WhatsApp Business application |
deviceManufacturer | string | Device manufacturer |
deviceModel | string | Device model |
osVersion | string | Operating system version |
waVersion | string | Application version - WhatsApp Business or WhatsApp |
battery | integer | Battery level |
Response body example#
{
"platform": "iphone",
"deviceManufacturer": "Apple",
"deviceModel": "iPhone 11",
"osVersion": "13.4.1",
"waVersion": "2.20.42",
"battery": 90
}
GetDeviceInfo errors#
For a list of errors common to all methods, refer to Common errors section
Request examples#
import requests
url = "{{apiUrl}}/waInstance{{idInstance}}/getDeviceInfo/{{apiTokenInstance}}"
payload = {}
headers= {}
response = requests.request("GET", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
curl --location '{{apiUrl}}/waInstance{{idInstance}}/getDeviceInfo/{{apiTokenInstance}}'
var restTemplate = new RestTemplate();
var requestUrl = new StringBuilder();
requestUrl
.append({{apiUrl}})
.append("/waInstance").append({{idInstance}})
.append("/getDeviceInfo/")
.append({{apiTokenInstance}});
var response = restTemplate.exchange(requestUrl.toString(), HttpMethod.GET, null, String.class);
System.out.println(response);
var requestUrl = new StringBuilder();
requestUrl
.append({{apiUrl}})
.append("/waInstance").append({{idInstance}})
.append("/getDeviceInfo/")
.append({{apiTokenInstance}});
var response = Unirest.get(requestUrl.toString())
.header("Content-Type", "application/json")
.asString();
System.out.println(response);