Reiniciar a sessão
curl --request POST \
--url https://api.wabox.me/instances/{instance_id}/token/{token}/restartconst options = {method: 'POST'};
fetch('https://api.wabox.me/instances/{instance_id}/token/{token}/restart', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wabox.me/instances/{instance_id}/token/{token}/restart"
response = requests.post(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wabox.me/instances/{instance_id}/token/{token}/restart",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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.wabox.me/instances/{instance_id}/token/{token}/restart"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"value": true,
"status": "connecting"
}{
"error": {
"code": "instance_not_found",
"message": "Instance not found or invalid token"
}
}Reinicia a sessão da instância no engine sem deslogar o WhatsApp — a conexão é refeita com as credenciais salvas. Use quando a instância travar em disconnected ou após alterar settings de sessão. status é o status logo após o reinício (normalmente connecting).
POST
/
instances
/
{instance_id}
/
token
/
{token}
/
restart
Reiniciar a sessão
curl --request POST \
--url https://api.wabox.me/instances/{instance_id}/token/{token}/restartconst options = {method: 'POST'};
fetch('https://api.wabox.me/instances/{instance_id}/token/{token}/restart', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wabox.me/instances/{instance_id}/token/{token}/restart"
response = requests.post(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wabox.me/instances/{instance_id}/token/{token}/restart",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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.wabox.me/instances/{instance_id}/token/{token}/restart"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"value": true,
"status": "connecting"
}{
"error": {
"code": "instance_not_found",
"message": "Instance not found or invalid token"
}
}