QR code (imagem PNG)
curl --request GET \
--url https://api.wabox.me/instances/{instance_id}/token/{token}/qr-code/imageconst options = {method: 'GET'};
fetch('https://api.wabox.me/instances/{instance_id}/token/{token}/qr-code/image', 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}/qr-code/image"
response = requests.get(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wabox.me/instances/{instance_id}/token/{token}/qr-code/image",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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}/qr-code/image"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": {
"code": "instance_not_found",
"message": "Instance not found or invalid token"
}
}{
"error": {
"code": "not_found",
"message": "No QR code available for this instance right now"
}
}QR code (imagem PNG)
Mesmo QR de GET /qr-code, mas entregue como imagem PNG (512×512) — útil para exibir direto em uma tag <img>. Responde 404 not_found quando não há QR disponível (instância conectada ou sessão ainda não iniciada).
GET
/
instances
/
{instance_id}
/
token
/
{token}
/
qr-code
/
image
QR code (imagem PNG)
curl --request GET \
--url https://api.wabox.me/instances/{instance_id}/token/{token}/qr-code/imageconst options = {method: 'GET'};
fetch('https://api.wabox.me/instances/{instance_id}/token/{token}/qr-code/image', 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}/qr-code/image"
response = requests.get(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wabox.me/instances/{instance_id}/token/{token}/qr-code/image",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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}/qr-code/image"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": {
"code": "instance_not_found",
"message": "Instance not found or invalid token"
}
}{
"error": {
"code": "not_found",
"message": "No QR code available for this instance right now"
}
}