waiaconnect

Documentation / Essential

Authentication

GET /v1/connections

Every /v1 call carries the header Authorization: Bearer <your API key>. The key looks like wclive and is created in the panel (API keys). It is shown ONCE at creation — store it. If it is missing or invalid, the API returns 401 with code APIKEYMISSING (header absent/malformed, an integration bug) or APIKEYINVALID (key invalid or revoked → rotate it in the panel).

# Every /v1 request needs: Authorization: Bearer <your API key>.
# A missing/invalid key → 401 { "error": { "code": "API_KEY_MISSING" | "API_KEY_INVALID" } }
curl https://api.waiaconnect.com/v1/connections \
  -H "Authorization: Bearer wc_live_YOUR_API_KEY"
const res = await fetch("https://api.waiaconnect.com/v1/connections", {
  headers: { "Authorization": "Bearer wc_live_YOUR_API_KEY" }
});
if (res.status === 401) throw new Error("Check/rotate your API key in the panel");
console.log(await res.json()); // { connections: [ { id: "conn_…", … } ] }
<?php
$ch = curl_init("https://api.waiaconnect.com/v1/connections");
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ["Authorization: Bearer wc_live_YOUR_API_KEY"],
]);
$body = curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($code === 401) { throw new Exception("Check/rotate your API key in the panel"); }
echo $body;
import requests
res = requests.get("https://api.waiaconnect.com/v1/connections",
  headers={"Authorization": "Bearer wc_live_YOUR_API_KEY"})
res.raise_for_status()  # 401 → check/rotate your API key in the panel
print(res.json())  # {"connections": [{"id": "conn_…", ...}]}

The code is the contract (for your switch); the English message is human help.

The API key never appears on this screen: it is hashed server-side. Copy yours from API keys.