Table of Contents
Get Received Chats. Requires “get_wa_received” API permission.GET https://androidapi.net/api/get/wa.received
Parameter #
Field | Type | Description |
---|---|---|
secret | String | The API secret you copied from (Tools -> API Keys) page |
limit (optional) | Number | Limit the number of results per page.Default value: 10 |
page (optional) | Number | Pagination of results.Default value: 1 |
Success Response Format #
Field | Type | Description |
---|---|---|
status | Number | List of Codes 200 = Success |
message | String | Response message |
data | Array | Array of data |
Error Response Format #
Name | Type | Description |
---|---|---|
status | Number | List of Codes 400 = Invalid parameters 401 = Invalid API secret 403 = Access denied 500 = Something went wrong |
message | String | Response message |
data | Array | Array of data |
PHP Sample #
<?php
$apiSecret = "API_SECRET"; // your API secret from (Tools -> API Keys) page
$cURL = curl_init();
curl_setopt($cURL, CURLOPT_URL, "https://androidapi.net/api/get/wa.received?secret={$apiSecret}");
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($cURL);
curl_close($cURL);
$result = json_decode($response, true);
// do something with response
print_r($result);
Python Sample #
import requests
# your API secret from (Tools -> API Keys) page
apiSecret = "API_SECRET"
r = requests.get(url = "https://androidapi.net/api/get/wa.received", params = {
"secret": apiSecret
})
# do something with response object
result = r.json()
Successful Response #
{
"status": 200,
"message": "Pending WhatsApp Chats",
"data": [
{
"id": 1,
"account": "+639760713666",
"recipient": "+639184661533",
"message": "Hello world!",
"attachment": false,
"created": 1645232578
},
{
"id": 2,
"account": "+639760713666",
"recipient": "+639184661533",
"message": "How are you?",
"attachment": false,
"created": 1645232635
},
{
"id": 3,
"account": "+639760713666",
"recipient": "+639184661533",
"message": "hahaha",
"attachment": "https://androidapi.net/uploads/whatsapp/received/c4ca4238a0b923820dcc509a6f75849b6352420c0654f1/60.jpeg",
"created": 1645232650
}
]
}
Error Response #
{
"status": 400,
"message": "Invalid Parameters!",
"data": false
}