Get list of known channels
curl --request GET \
--url https://{host}/api/{session}/channels \
--header 'apikey: <api-key>'import requests
url = "https://{host}/api/{session}/channels"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://{host}/api/{session}/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://{host}/api/{session}/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 => [
"apikey: <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://{host}/api/{session}/channels"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{host}/api/{session}/channels")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/{session}/channels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"newsletters": [
{
"id": "123456789@newsletter",
"name": "News Channel",
"description": "Latest news and updates"
},
{
"id": "987654321@newsletter",
"name": "Technology Channel",
"description": "Tech world news"
}
]
}
Channels
List Known Channels
Get list of all channels (newsletters) known by the session
GET
/
api
/
{session}
/
channels
Get list of known channels
curl --request GET \
--url https://{host}/api/{session}/channels \
--header 'apikey: <api-key>'import requests
url = "https://{host}/api/{session}/channels"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://{host}/api/{session}/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://{host}/api/{session}/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 => [
"apikey: <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://{host}/api/{session}/channels"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{host}/api/{session}/channels")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/{session}/channels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"newsletters": [
{
"id": "123456789@newsletter",
"name": "News Channel",
"description": "Latest news and updates"
},
{
"id": "987654321@newsletter",
"name": "Technology Channel",
"description": "Tech world news"
}
]
}
Description
This endpoint returns a list of all channels that the session knows, including followed channels and other channels available on WhatsApp.URL Parameters
string
required
WhatsApp unique authenticated session ID
Response
array
{
"newsletters": [
{
"id": "123456789@newsletter",
"name": "News Channel",
"description": "Latest news and updates"
},
{
"id": "987654321@newsletter",
"name": "Technology Channel",
"description": "Tech world news"
}
]
}
Status Codes
200- List obtained successfully401- Unauthorized500- Internal server error
Usage Example
curl -X GET https://api.wappfy.com.br/api/my-session/channels
const session = 'my-session';
const response = await fetch(`https://api.wappfy.com.br/api/${session}/channels`);
const data = await response.json();
console.log(data.newsletters);
import requests
session = 'my-session'
response = requests.get(f'https://api.wappfy.com.br/api/{session}/channels')
data = response.json()
print(data['newsletters'])
Authorizations
Your Wappfy API key (get it at dash.wappfy.com.br)
Query Parameters
Available options:
OWNER, ADMIN, SUBSCRIBER Response
200 - application/json
Newsletter id
Example:
"123123123123@newsletter"
Channel name
Example:
"Channel Name"
Invite link
Example:
"https://www.whatsapp.com/channel/111111111111111111111111"
Available options:
OWNER, ADMIN, SUBSCRIBER, GUEST Preview for channel's picture
Example:
"https://mmg.whatsapp.net/m1/v/t24/An&_nc_cat=10"
Channel's picture
Example:
"https://mmg.whatsapp.net/m1/v/t24/An&_nc_cat=10"
