Excluir instância
curl --request DELETE \
--url https://api.wabox.me/partner/instances/{instance_id} \
--header 'Partner-Token: <api-key>'const options = {method: 'DELETE', headers: {'Partner-Token': '<api-key>'}};
fetch('https://api.wabox.me/partner/instances/{instance_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wabox.me/partner/instances/{instance_id}"
headers = {"Partner-Token": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wabox.me/partner/instances/{instance_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Partner-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.wabox.me/partner/instances/{instance_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Partner-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": {
"code": "partner_token_required",
"message": "Invalid Partner-Token"
}
}Desconecta o número (o aparelho vinculado some do celular), para a sessão e remove a instância. Mensagens na fila são descartadas.
DELETE
/
partner
/
instances
/
{instance_id}
Excluir instância
curl --request DELETE \
--url https://api.wabox.me/partner/instances/{instance_id} \
--header 'Partner-Token: <api-key>'const options = {method: 'DELETE', headers: {'Partner-Token': '<api-key>'}};
fetch('https://api.wabox.me/partner/instances/{instance_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wabox.me/partner/instances/{instance_id}"
headers = {"Partner-Token": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wabox.me/partner/instances/{instance_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Partner-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.wabox.me/partner/instances/{instance_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Partner-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": {
"code": "partner_token_required",
"message": "Invalid Partner-Token"
}
}