Verificar status da instância
curl --request GET \
--url https://api.wppfy.com/instance/status \
--header 'token: <api-key>'import requests
url = "https://api.wppfy.com/instance/status"
headers = {"token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {token: '<api-key>'}};
fetch('https://api.wppfy.com/instance/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/instance/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.wppfy.com/instance/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.wppfy.com/instance/status")
.header("token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/instance/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"instance": {
"id": "r183e2ef9597845",
"name": "minha-instancia",
"status": "connected",
"profileName": "Meu WhatsApp",
"currentTime": "2024-01-25T12:00:00.000Z"
},
"status": {
"connected": true,
"loggedIn": true,
"jid": {
"user": "5511999999999",
"agent": 0,
"device": 0,
"server": "s.whatsapp.net"
}
}
}{
"error": "instance info not found"
}Instancia
Verificar status da instância
Retorna o status atual de uma instância, incluindo:
- Estado da conexão (disconnected, connecting, connected)
- QR code atualizado (se em processo de conexão)
- Código de pareamento (se disponível)
- Informações da última desconexão
- Detalhes completos da instância
Este endpoint é particularmente útil para:
- Monitorar o progresso da conexão
- Obter QR codes atualizados durante o processo de conexão
- Verificar o estado atual da instância
- Identificar problemas de conexão
Estados possíveis:
disconnected: Desconectado do WhatsAppconnecting: Em processo de conexão (aguardando QR code ou código de pareamento)connected: Conectado e autenticado com sucesso
GET
/
instance
/
status
Verificar status da instância
curl --request GET \
--url https://api.wppfy.com/instance/status \
--header 'token: <api-key>'import requests
url = "https://api.wppfy.com/instance/status"
headers = {"token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {token: '<api-key>'}};
fetch('https://api.wppfy.com/instance/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/instance/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.wppfy.com/instance/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.wppfy.com/instance/status")
.header("token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/instance/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"instance": {
"id": "r183e2ef9597845",
"name": "minha-instancia",
"status": "connected",
"profileName": "Meu WhatsApp",
"currentTime": "2024-01-25T12:00:00.000Z"
},
"status": {
"connected": true,
"loggedIn": true,
"jid": {
"user": "5511999999999",
"agent": 0,
"device": 0,
"server": "s.whatsapp.net"
}
}
}{
"error": "instance info not found"
}Autorizações
Resposta
Sucesso
Representa uma instância do WhatsApp
Show child attributes
Show child attributes
Exemplo:
{
"id": "i91011ijkl",
"token": "abc123xyz",
"status": "connected",
"paircode": "1234-5678",
"qrcode": "data:image/png;base64,iVBORw0KGg...",
"name": "Instância Principal",
"profileName": "Loja ABC",
"profilePicUrl": "https://example.com/profile.jpg",
"isBusiness": true,
"plataform": "Android",
"systemName": "WppFy",
"owner": "user@example.com",
"lastDisconnect": "2025-01-24T14:00:00Z",
"lastDisconnectReason": "Network error",
"adminField01": "custom_data",
"openai_apikey": "sk-...xyz",
"chatbot_enabled": true,
"chatbot_ignoreGroups": true,
"chatbot_stopConversation": "parar",
"chatbot_stopMinutes": 60,
"created": "2025-01-24T14:00:00Z",
"updated": "2025-01-24T14:30:00Z",
"delayMin": 2,
"delayMax": 4
}
Show child attributes
Show child attributes
