Status da mensagem em grupo
curl --request POST \
--url https://api.wppfy.com/message/status \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"id": "3EB0538DA65A59F6D8A251",
"limit": 100,
"offset": 0
}
'import requests
url = "https://api.wppfy.com/message/status"
payload = {
"id": "3EB0538DA65A59F6D8A251",
"limit": 100,
"offset": 0
}
headers = {
"token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: '3EB0538DA65A59F6D8A251', limit: 100, offset: 0})
};
fetch('https://api.wppfy.com/message/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wppfy.com/message/status",
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([
'id' => '3EB0538DA65A59F6D8A251',
'limit' => 100,
'offset' => 0
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <api-key>"
],
]);
$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.wppfy.com/message/status"
payload := strings.NewReader("{\n \"id\": \"3EB0538DA65A59F6D8A251\",\n \"limit\": 100,\n \"offset\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("token", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://api.wppfy.com/message/status")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"3EB0538DA65A59F6D8A251\",\n \"limit\": 100,\n \"offset\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/message/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"3EB0538DA65A59F6D8A251\",\n \"limit\": 100,\n \"offset\": 0\n}"
response = http.request(request)
puts response.read_body{
"source": "memory",
"summary": {
"delivered": 123,
"read": 123
},
"receipts": [
{
"participant": "<string>",
"participant_pn": "<string>",
"participant_lid": "<string>",
"state": "Delivered",
"timestamp": 123
}
],
"pagination": {
"totalRecords": 123,
"limit": 123,
"offset": 123,
"hasMore": true,
"nextOffset": 123
}
}Ações na mensagem e Buscar
Status da mensagem em grupo
Mostra quem recebeu e quem leu uma mensagem que você enviou num grupo: primeiro um resumo com os totais, depois a lista de cada participante. source diz de onde veio a resposta.
source: "memory": depois que esta rota é usada para um grupo, a API passa a acompanhar em memória as confirmações dos grupos da instância, até 24 horas depois da última consulta. Respondem daí, na hora e sem depender do celular, as mensagens enviadas a partir de então e as que o celular já respondeu, com as confirmações que chegaram depois somadas. Cada mensagem fica até 24 horas na memória; em instâncias com muito envio para grupos, as mais antigas saem antes.source: "phone": a primeira consulta de uma mensagem enviada antes disso, ou de qualquer mensagem depois de um reinício do servidor, pergunta ao celular da conta. O celular precisa estar ligado e com internet. Com o WhatsApp aberto, a resposta vem em cerca de 1 segundo; com o celular parado (um iPhone em segundo plano, por exemplo), ela pode não vir. Sem resposta em 40 segundos, a rota retorna504. A lista é a que o celular guarda: logo depois de ficar sem internet, ele pode responder antes de receber as confirmações que chegaram nesse meio-tempo.summary: quantos participantes receberam (delivered) e leram (read). Quem leu também conta como recebido, e quem ouviu um áudio ou vídeo conta como lido.receipts: um item por participante e estado, em ordem de horário e em páginas, como nas outras listas da API: para a próxima, envie opagination.nextOffsetemoffsetenquantopagination.hasMorefortrue. O resumo vem em todas.- Quem leu pode vir sem o item
Delivered, quando o celular não guardou a hora da entrega. statefiltra a lista por estado:Delivered,ReadouPlayed. O resumo continua com os totais da mensagem.idaceita o ID completo ou o curto da mensagem, que precisa estar no histórico da instância.- A API não grava as confirmações em banco. Para acompanhá-las ao vivo, use o webhook
messages_updatecomtype: "GroupReceipts".
POST
/
message
/
status
Status da mensagem em grupo
curl --request POST \
--url https://api.wppfy.com/message/status \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"id": "3EB0538DA65A59F6D8A251",
"limit": 100,
"offset": 0
}
'import requests
url = "https://api.wppfy.com/message/status"
payload = {
"id": "3EB0538DA65A59F6D8A251",
"limit": 100,
"offset": 0
}
headers = {
"token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: '3EB0538DA65A59F6D8A251', limit: 100, offset: 0})
};
fetch('https://api.wppfy.com/message/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wppfy.com/message/status",
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([
'id' => '3EB0538DA65A59F6D8A251',
'limit' => 100,
'offset' => 0
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <api-key>"
],
]);
$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.wppfy.com/message/status"
payload := strings.NewReader("{\n \"id\": \"3EB0538DA65A59F6D8A251\",\n \"limit\": 100,\n \"offset\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("token", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://api.wppfy.com/message/status")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"3EB0538DA65A59F6D8A251\",\n \"limit\": 100,\n \"offset\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/message/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"3EB0538DA65A59F6D8A251\",\n \"limit\": 100,\n \"offset\": 0\n}"
response = http.request(request)
puts response.read_body{
"source": "memory",
"summary": {
"delivered": 123,
"read": 123
},
"receipts": [
{
"participant": "<string>",
"participant_pn": "<string>",
"participant_lid": "<string>",
"state": "Delivered",
"timestamp": 123
}
],
"pagination": {
"totalRecords": 123,
"limit": 123,
"offset": 123,
"hasMore": true,
"nextOffset": 123
}
}Autorizações
Corpo
application/json
ID da mensagem (completo ou curto).
Exemplo:
"3EB0538DA65A59F6D8A251"
Só as confirmações deste estado. Sem ele, todas.
Opções disponíveis:
Delivered, Read, Played Itens por página. Acima de 500 usa 500.
Intervalo obrigatório:
1 <= x <= 500Deslocamento base zero; use o pagination.nextOffset da página anterior.
Intervalo obrigatório:
x >= 0Resposta
Resumo e página de confirmações, em ordem de horário.
De onde veio a resposta: memory (confirmações que a API acompanhou, somadas à resposta anterior do celular quando houve) ou phone (o celular da conta, nesta consulta).
Opções disponíveis:
memory, phone Totais de participantes; o mesmo em todas as páginas.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
