GetDeviceInfo#
שימו לב, בבקשה! השיטה לא עובדת באופן זמני. כאשר השיטה נקראת, תוחזר שגיאת 405.
השיטה מכוונת לקבלת מידע על המכשיר (הטלפון) פועל WhatsApp Business בַּקָשָׁה.
בַּקָשָׁה#
כדי לקבל מידע על המכשיר, עליך לבצע בקשה בכתובת:
 GET    
 {{apiUrl}}/waInstance{{idInstance}}/getDeviceInfo/{{apiTokenInstance}}
לפרמטרים של בקשת apiUrl, idInstance ו-apiTokenInstance, עיין ב לפני שמתחילים סָעִיף.
תְגוּבָה#
פרמטרי תגובה#
| פָּרָמֶטֶר | סוּג | תֵאוּר | 
|---|---|---|
platform |  string | מערכת ההפעלה של המכשיר פועלת WhatsApp Business בַּקָשָׁה | 
deviceManufacturer |  string | יצרן המכשיר | 
deviceModel |  string | דגם מכשיר | 
osVersion |  string | גרסת מערכת הפעלה | 
waVersion |  string | גרסת האפליקציה - WhatsApp Business אוֹ WhatsApp | 
battery |  integer | רמת סוללה | 
בקשת גוף לדוגמה#
{
    "platform": "iphone",
    "deviceManufacturer": "Apple",
    "deviceModel": "iPhone 11",
    "osVersion": "13.4.1",
    "waVersion": "2.20.42",
    "battery": 90
}
שגיאות GetDeviceInfo#
לרשימה של שגיאות משותפות לכל השיטות, עיין ב Common errors סָעִיף
בקש דוגמאות#
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);