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",
"currentPresence": "available"
},
"response": "Disconnected",
"info": "El dispositivo se desconectó correctamente de WhatsApp. Se requerirá un nuevo código QR para la próxima conexión."
}Desconectar instancia
Desconecta la cuenta de WhatsApp actualmente conectada, finalizando la sesión actual. Esta operación:
-
Finaliza la conexión activa
-
Requiere un nuevo código QR para reconectar
Diferencias entre desconectar e hibernar:
-
Desconectar: Finaliza completamente la sesión, exigiendo un nuevo inicio de sesión
-
Hibernar: Mantiene la sesión activa, solo pausa la conexión
Utilice este endpoint para:
-
Finalizar completamente una sesión
-
Forzar una nueva autenticación
-
Limpiar las credenciales de la sesión actual
-
Reiniciar el proceso de conexión
Estados posibles después de desconectar:
-
disconnected: Desconectado de WhatsApp -
connecting: En proceso de reconexión (después de 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",
"currentPresence": "available"
},
"response": "Disconnected",
"info": "El dispositivo se desconectó correctamente de WhatsApp. Se requerirá un nuevo código QR para la próxima conexión."
}Autorizaciones
Respuesta
Éxito
Representa una instancia de 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", "currentPresence": "available" }
"Disconnected"
"El dispositivo se desconectó correctamente de WhatsApp. Se requerirá un nuevo código QR para la próxima conexión."
