Skip to content

LastIncomingCalls#

ื’ืจืกืช ื‘ื˜ื

ื”ืคื•ื ืงืฆื™ื•ื ืœื™ื•ืช ื ืžืฆืืช ื‘ืžืฆื‘ ื’ืจืกืช ื‘ื˜ื. ืคื•ื ืงืฆื™ื•ืช ืขืฉื•ื™ื•ืช ืœื”ืฉืชื ื•ืช ื•ื™ื™ืชื›ืŸ ืฉื™ืคืขืœื• ื‘ืื•ืคืŸ ืœื ื™ืฆื™ื‘

Test Postman Apidog

ื”ืฉื™ื˜ื” ืžื—ื–ื™ืจื” ืฉื™ื—ื•ืช ื ื›ื ืกื•ืช ืื—ืจื•ื ื•ืช

ื”ื’ื“ืจื•ืช

ื›ื“ื™ ืœืงื‘ืœ ืžื™ื“ืข ืขืœ ืฉื™ื—ื•ืช ื ื›ื ืกื•ืช, ื™ืฉ ืœื”ืคืขื™ืœ ืืช ื”ื”ื’ื“ืจื•ืช incomingWebhook ะธ incomingCallWebhook ื‘ืืžืฆืขื•ืช ื”ืฉื™ื˜ื” SetSettings ืื• ื“ืจืš console.

ื™ื™ืฉื•ื ื”ื”ื’ื“ืจื•ืช ืื•ืจืš ืขื“ 5 ื“ืงื•ืช

ื›ื“ื™ ืœืงื‘ืœ ืžื™ื“ืข ืขืœ ืฉื™ื—ื•ืช ื ื›ื ืกื•ืช ืœืคื ื™ ื—ื™ื‘ื•ืจ ื”ืžื•ืคืข (Instance), ื™ืฉ ืœืื—ืจ ืฉืžื™ืจืช ื”ื”ื’ื“ืจื•ืช ื‘ืžื•ืคืข ืœื‘ืฆืข ื”ืชื ืชืงื•ืช ื•-ื”ืจืฉืื” ืžื—ื“ืฉ.

ื”ืฉื™ื˜ื” ืžื—ื–ื™ืจื” ืืช 10000 ื”ืฉื™ื—ื•ืช ื”ืื—ืจื•ื ื•ืช. ื”ืฉื™ื˜ื” LastIncomingCalls ืžื—ื–ื™ืจื” ืจืง ืืช ื”ื”ื™ืกื˜ื•ืจื™ื” ืฉ-WhatsApp ืžืกืคืงืช ืœืžืขืจื›ืช.

ื”ื•ืคืขืช ื”ืžื™ื“ืข ื‘ื™ื•ืžืŸ ืขืฉื•ื™ื” ืœืืจื•ืš ืขื“ 2 ื“ืงื•ืช. ื™ืฉ ืœื”ืฉืชืžืฉ ื‘ืฉื™ื˜ื•ืช ื”ื™ื•ืžืŸ ืจืง ืœืงื‘ืœืช ื”ื™ืกื˜ื•ืจื™ื™ืช ืฉื™ื—ื•ืช. ืœืงื‘ืœืช ืื™ืจื•ืขื™ื ื‘ื–ืžืŸ ืืžืช ื™ืฉ ืœื”ืฉืชืžืฉ ื‘ืžืขืจื›ืช ื”ื”ื•ื“ืขื•ืช (Webhooks).

ื‘ืงืฉื”#

ืœืงื‘ืœืช ื”ื™ืกื˜ื•ืจื™ื™ืช ืฉื™ื—ื•ืช ื ื›ื ืกื•ืช ื™ืฉ ืœื‘ืฆืข ื‘ืงืฉื” ืœื›ืชื•ื‘ืช:

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

ืœืงื‘ืœืช ืคืจืžื˜ืจื™ ื”ื‘ืงืฉื” apiUrl, idInstance ื•-apiTokenInstance, ืคื ื• ืœืคืจืง ืœืคื ื™ ืชื—ื™ืœืช ื”ืขื‘ื•ื“ื”.

ืคืจืžื˜ืจื™ ื›ืชื•ื‘ืช ื”ื‘ืงืฉื” (URL)#

ืคืจืžื˜ืจ ืกื•ื’ ื—ื•ื‘ื” ืชื™ืื•ืจ
minutes integer ืœื ื–ืžืŸ ื‘ื“ืงื•ืช ืฉืขื‘ื•ืจื• ื ื“ืจืฉ ืœื”ืฆื™ื’ ืฉื™ื—ื•ืช (ื‘ืจื™ืจืช ื”ืžื—ื“ืœ ื”ื™ื 1440 ื“ืงื•ืช)

ืชืฉื•ื‘ื”#

ืฉื“ื•ืช ื”ืชื’ื•ื‘ื”#

ืžืขืจืš ืฉืœ ืื•ื‘ื™ื™ืงื˜ื™ื ืขื ื”ืฉื“ื•ืช:

ืฉื“ื” ืกื•ื’ ืชื™ืื•ืจ
type string ืกื•ื’ ื”ืฉื™ื—ื”, incoming - ืฉื™ื—ื” ื ื›ื ืกืชืฉื™ื—ื”
idMessage string ืžื–ื”ื” ื”ืฉื™ื—ื” ื”ื ื›ื ืกืชะทะฒะพะฝะบะฐ
timestamp integer ืฉืขืช ืกื™ื•ื ื”ืฉื™ื—ื” ื‘ืคื•ืจืžื˜ UNIX
typeMessage string ืกื•ื’ ื”ืฉื™ื—ื”: incomingCall - ืฉื™ื—ื” ื ื›ื ืกืชะทะฒะพะฝะพะบ
chatId string ื–ื™ื”ื•ื™ ืฆ'ืื˜, ื‘ื• ื‘ื•ืฆืขื” ื”ืฉื™ื—ื”
isVideo boolean ื“ื’ืœ ื”ืžืฆื™ื™ืŸ ื”ืื ื”ื™ื™ืชื” ื–ื• ืฉื™ื—ืช ื•ื™ื“ืื•
status string ืกื˜ื˜ื•ืก ื”ืฉื™ื—ื”. ื™ื›ื•ืœ ืœืงื‘ืœ ืืช ื”ืขืจื›ื™ื ื”ื‘ืื™ื:
pickUp - ืฉื™ื—ื” ื ื›ื ืกืช ืฉื ืขื ืชื”
hungUp - ื”ื ืžืขืŸ ืฉืœ ื”ืฉื™ื—ื” ื”ื ื›ื ืกืช ืœื ืขื ื” ื•ื ื™ืชืง ืืช ื”ืฉื™ื—ื”, ื‘ื˜ืœืคื•ืŸ ื”ื•ืคืขืœื” ืคื•ื ืงืฆื™ื™ืช "ืœื ืœื”ืคืจื™ืข"
missed - ื™ื•ื–ื ื”ืฉื™ื—ื” ื‘ื™ื˜ืœ ืืช ื”ืฉื™ื—ื”. ืกื˜ื˜ื•ืก ืžื™ื•ืฉืŸ, ื‘ืžืงื•ืžื• ืžื’ื™ืขdeclined
declined - ืฉื™ื—ื” ืฉืœื ื ืขื ืชื” ืื• ืฉื™ื•ื–ื ื”ืฉื™ื—ื” ื‘ื™ื˜ืœ ืืช ื”ืฉื™ื—ื”

ื“ื•ื’ืžื” ืœื’ื•ืฃ ื”ืชื’ื•ื‘ื”#

[
    {
        "type": "incoming",
        "idMessage": "F33E8701AGHY4DE04254CBBAE21EC046",
        "timestamp": 1754455764,
        "typeMessage": "incomingCall",
        "chatId": "79001234567@c.us",
        "isVideo": false,
        "status": "pickUp"
    }
]

ืชืงืœื•ืช LastIncomingCalls#

ืจืฉื™ืžืช ื”ืฉื’ื™ืื•ืช ื”ืžืฉื•ืชืคื•ืช ืœื›ืœ ื”ืฉื™ื˜ื•ืช ื ืžืฆืืช ื‘ืคืจืง ืฉื’ื™ืื•ืช ืกื˜ื ื“ืจื˜ื™ื•ืช

ื“ื•ื’ืžืื•ืช ืงื•ื“#

import requests

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

payload = {}
headers= {}

response = requests.request("GET", url, headers=headers, data = payload)

print(response.text.encode('utf8'))
curl --location '{{apiUrl}}/waInstance{{idInstance}}/lastIncomingCalls/{{apiTokenInstance}}'
var restTemplate = new RestTemplate();
var requestUrl = new StringBuilder();
requestUrl
    .append({{apiUrl}})
    .append("/waInstance").append({{idInstance}})
    .append("/lastIncomingCalls/")
    .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("/lastIncomingCalls/")
    .append({{apiTokenInstance}});

var response = Unirest.get(requestUrl.toString())
    .header("Content-Type", "application/json")
    .asString();

System.out.println(response);
Sub LastIncomingCalls()
    Dim url As String
    Dim http As Object
    Dim response As String

    ' The apiUrl, idInstance and apiTokenInstance values are available in console, double brackets must be removed
    url = "{{apiUrl}}/waInstance{{idInstance}}/lastIncomingCalls/{{apiTokenInstance}}"

    Set http = CreateObject("MSXML2.XMLHTTP")

    http.Open "GET", url, False
    http.send

    response = http.responseText

    Debug.Print response

    ' Outputting the answer to the desired cell
    Range("A1").Value = response

    Set http = Nothing
End Sub