Reiniciar la conexión de la instancia
curl --request POST \
--url https://api.wppfy.com/instance/reset \
--header 'token: <api-key>'import requests
url = "https://api.wppfy.com/instance/reset"
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/reset', 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/reset",
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/reset"
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/reset")
.header("token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/instance/reset")
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{
"response": "Instance reset started",
"resetting": true,
"instanceId": "r183e2ef9597845",
"queuedRecoveryAttempted": true
}Instancia
Reiniciar la conexión de la instancia
Solicita una reanudación controlada de la conexión sin eliminar la instancia ni el emparejamiento existente. Usar cuando la sesión esté bloqueada o los envíos no estén avanzando.
Comportamientos posibles:
- inicia un nuevo reset cuando la instancia está apta
- informa que ya hay un reset en curso
- informa que existe un cooldown activo entre resets
- devuelve un error cuando la sesión no puede recuperarse o cuando la política de reconexión bloquea la operación
La respuesta informa:
instanceId: ID de la instancia autenticadaresetting: si hay un reset en curso en este momentoqueuedRecoveryAttempted: si los mensajes pendientes también entraron en el intento de recuperación
POST
/
instance
/
reset
Reiniciar la conexión de la instancia
curl --request POST \
--url https://api.wppfy.com/instance/reset \
--header 'token: <api-key>'import requests
url = "https://api.wppfy.com/instance/reset"
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/reset', 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/reset",
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/reset"
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/reset")
.header("token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/instance/reset")
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{
"response": "Instance reset started",
"resetting": true,
"instanceId": "r183e2ef9597845",
"queuedRecoveryAttempted": true
}