cURL
curl --request GET \
--url https://www.wassly.com/api/whatsapp-web-devices \
--header 'Authorization: Bearer <token>' \
--header 'apikey: <api-key>'import requests
url = "https://www.wassly.com/api/whatsapp-web-devices"
headers = {
"Authorization": "Bearer <token>",
"apikey": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>', apikey: '<api-key>'}};
fetch('https://www.wassly.com/api/whatsapp-web-devices', 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://www.wassly.com/api/whatsapp-web-devices",
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>",
"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://www.wassly.com/api/whatsapp-web-devices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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://www.wassly.com/api/whatsapp-web-devices")
.header("Authorization", "Bearer <token>")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.wassly.com/api/whatsapp-web-devices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_bodyWhatsapp Web API
List Devices
GET
/
api
/
whatsapp-web-devices
cURL
curl --request GET \
--url https://www.wassly.com/api/whatsapp-web-devices \
--header 'Authorization: Bearer <token>' \
--header 'apikey: <api-key>'import requests
url = "https://www.wassly.com/api/whatsapp-web-devices"
headers = {
"Authorization": "Bearer <token>",
"apikey": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>', apikey: '<api-key>'}};
fetch('https://www.wassly.com/api/whatsapp-web-devices', 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://www.wassly.com/api/whatsapp-web-devices",
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>",
"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://www.wassly.com/api/whatsapp-web-devices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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://www.wassly.com/api/whatsapp-web-devices")
.header("Authorization", "Bearer <token>")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.wassly.com/api/whatsapp-web-devices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_bodyOverview
This endpoint retrieves a list of all WhatsApp Web devices associated with your account. It provides information about active and connected WhatsApp Web sessions, allowing you to monitor and manage device connections, and use instance_id later for sending out Whatsapp messages to customers.Authentication
This endpoint requires API key authentication via the request header. Header:apikey: Your API key for authentication (required)- Autherizaion: Bearer token: The token been generated from the login API (required)
Required Variables
{{baseUrl}}: The base URL of the API server{{apikey}}: Your unique API key for authentication{{token}}: Your unique API key for authentication
Expected Response
The endpoint returns a JSON response containing an array of WhatsApp Web device objects. Each device object typically includes:- Device ID
- Device name/type
- Connection status
- Last active timestamp
- Session information
{
"success": true,
"devices": [
{
"id": "device_id_123",
"name": "Chrome on Windows",
"status": "connected",
"lastActive": "2024-01-15T10:30:00Z",
"instance_id": "14wdfwef-da6f-11f0-3314-32423432"
}
]
}
Use Cases
- Device Management: Monitor all active WhatsApp Web sessions connected to your account
- Session Monitoring: Track device activity and connection status
- Multi-device Support: Manage multiple WhatsApp Web instances across different devices
- Automated Monitoring: Integrate with monitoring systems to track device health and connectivity

