List channels
curl --request GET \
--url https://api-v2.manybot.com.br/channels \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-v2.manybot.com.br/channels"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-v2.manybot.com.br/channels', 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-v2.manybot.com.br/channels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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-v2.manybot.com.br/channels"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-v2.manybot.com.br/channels")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-v2.manybot.com.br/channels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "clh1234567890",
"companyId": "clh9876543210",
"connectionStatus": "connected",
"type": "whatsapp",
"createdAt": "2024-01-15T10:30:00Z",
"name": "Canal WhatsApp Principal",
"phone": "+5511999999999",
"qrcode": {
"base64": "iVBORw0KGgoAAAANSUhEUgAA..."
},
"paircode": "ABC123XYZ"
}
]{
"statusCode": 401,
"message": "Unauthorized"
}Channels
List Channels
Retorna todos os canais da empresa.
GET
/
channels
List channels
curl --request GET \
--url https://api-v2.manybot.com.br/channels \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-v2.manybot.com.br/channels"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-v2.manybot.com.br/channels', 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-v2.manybot.com.br/channels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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-v2.manybot.com.br/channels"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-v2.manybot.com.br/channels")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-v2.manybot.com.br/channels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "clh1234567890",
"companyId": "clh9876543210",
"connectionStatus": "connected",
"type": "whatsapp",
"createdAt": "2024-01-15T10:30:00Z",
"name": "Canal WhatsApp Principal",
"phone": "+5511999999999",
"qrcode": {
"base64": "iVBORw0KGgoAAAANSUhEUgAA..."
},
"paircode": "ABC123XYZ"
}
]{
"statusCode": 401,
"message": "Unauthorized"
}Authorizations
Token JWT da sua conta. Use o formato: Bearer {seu-jwt-token}
Response
Lista de canais retornada com sucesso
ID único do canal
Example:
"clh1234567890"
ID da empresa proprietária do canal
Example:
"clh9876543210"
Status da conexão do canal
Available options:
open, close, connecting, refused, qrcode_limit_scan Example:
"connected"
Tipo do canal
Available options:
whatsapp, telegram, instagram Example:
"whatsapp"
Data de criação do canal
Example:
"2024-01-15T10:30:00Z"
Nome do canal
Example:
"Canal WhatsApp Principal"
Número do telefone conectado
Example:
"+5511999999999"
QR Code para conexão
Show child attributes
Show child attributes
Código de pareamento
Example:
"ABC123XYZ"

