curl --request POST \
--url https://api.wppfy.com/instance/disconnect \
--header 'token: <api-key>'import requests
url = "https://api.wppfy.com/instance/disconnect"
headers = {"token": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {token: '<api-key>'}};
fetch('https://api.wppfy.com/instance/disconnect', 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/disconnect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/disconnect"
req, _ := http.NewRequest("POST", 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.post("https://api.wppfy.com/instance/disconnect")
.header("token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/instance/disconnect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"instance": {
"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
},
"response": "Disconnected",
"info": "The device has been successfully disconnected from WhatsApp. A new QR code will be required for the next connection."
}Desconectar instância
Desconecta a instância do WhatsApp, encerrando a sessão atual. Esta operação:
-
Encerra a conexão ativa
-
Requer novo QR code para reconectar
Diferenças entre desconectar e hibernar:
-
Desconectar: Encerra completamente a sessão, exigindo novo login
-
Hibernar: Mantém a sessão ativa, apenas pausa a conexão
Use este endpoint para:
-
Encerrar completamente uma sessão
-
Forçar uma nova autenticação
-
Limpar credenciais de uma instância
-
Reiniciar o processo de conexão
Estados possíveis após desconectar:
-
disconnected: Desconectado do WhatsApp -
connecting: Em processo de reconexão (após usar /instance/connect)
curl --request POST \
--url https://api.wppfy.com/instance/disconnect \
--header 'token: <api-key>'import requests
url = "https://api.wppfy.com/instance/disconnect"
headers = {"token": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {token: '<api-key>'}};
fetch('https://api.wppfy.com/instance/disconnect', 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/disconnect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/disconnect"
req, _ := http.NewRequest("POST", 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.post("https://api.wppfy.com/instance/disconnect")
.header("token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/instance/disconnect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"instance": {
"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
},
"response": "Disconnected",
"info": "The device has been successfully disconnected from WhatsApp. A new QR code will be required for the next connection."
}Autorizações
Resposta
Sucesso
Representa uma instância do WhatsApp
Show child attributes
Show child attributes
{
"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
}
"Disconnected"
"The device has been successfully disconnected from WhatsApp. A new QR code will be required for the next connection."
