cURL
curl --request POST \
--url https://api.wabox.me/instances/{instance_id}/token/{token}/read-message \
--header 'Content-Type: application/json' \
--data '
{
"phone": "5511988887777"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({phone: '5511988887777'})
};
fetch('https://api.wabox.me/instances/{instance_id}/token/{token}/read-message', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wabox.me/instances/{instance_id}/token/{token}/read-message"
payload = { "phone": "5511988887777" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wabox.me/instances/{instance_id}/token/{token}/read-message",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'phone' => '5511988887777'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wabox.me/instances/{instance_id}/token/{token}/read-message"
payload := strings.NewReader("{\n \"phone\": \"5511988887777\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"value": true,
"read": [
"3EB0A9C6D2F1E4B5A7C8"
]
}{
"error": {
"code": "instance_not_found",
"message": "Instance not found or invalid token"
}
}{
"error": {
"code": "subscription_required",
"message": "Trial expired or subscription inactive. Subscribe in the dashboard to keep sending."
}
}{
"error": {
"code": "instance_not_connected",
"message": "Instance is not connected"
}
}{
"error": {
"code": "queue_full",
"message": "Queue is full (1000 messages waiting)"
}
}Ação imediata: exige a instância conectada e não passa pela fila (responde 409 instance_not_connected se estiver offline). Informe message_id ou message_ids (até 100) e, em grupos, o participant que as enviou.
POST
/
instances
/
{instance_id}
/
token
/
{token}
/
read-message
cURL
curl --request POST \
--url https://api.wabox.me/instances/{instance_id}/token/{token}/read-message \
--header 'Content-Type: application/json' \
--data '
{
"phone": "5511988887777"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({phone: '5511988887777'})
};
fetch('https://api.wabox.me/instances/{instance_id}/token/{token}/read-message', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wabox.me/instances/{instance_id}/token/{token}/read-message"
payload = { "phone": "5511988887777" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wabox.me/instances/{instance_id}/token/{token}/read-message",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'phone' => '5511988887777'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wabox.me/instances/{instance_id}/token/{token}/read-message"
payload := strings.NewReader("{\n \"phone\": \"5511988887777\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"value": true,
"read": [
"3EB0A9C6D2F1E4B5A7C8"
]
}{
"error": {
"code": "instance_not_found",
"message": "Instance not found or invalid token"
}
}{
"error": {
"code": "subscription_required",
"message": "Trial expired or subscription inactive. Subscribe in the dashboard to keep sending."
}
}{
"error": {
"code": "instance_not_connected",
"message": "Instance is not connected"
}
}{
"error": {
"code": "queue_full",
"message": "Queue is full (1000 messages waiting)"
}
}Path Parameters
Id da instância (dashboard › instância › Credenciais).
Token da instância. Trate como senha.
Body
application/json
Minimum string length:
1Pattern:
^(\d{5,20}|\d+@lid|\d+(-\d+)?-group|\d+@g\.us|\d+@newsletter|\d+@broadcast|status@broadcast)$Minimum string length:
1Required array length:
1 - 100 elementsMinimum string length:
1Minimum string length:
1Pattern:
^(\d{5,20}|\d+@lid|\d+(-\d+)?-group|\d+@g\.us|\d+@newsletter|\d+@broadcast|status@broadcast)$