List connected WhatsApp accounts
package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.kirim.chat/v1/accounts?status=connected"
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(res) fmt.Println(string(body))
}const url = 'https://api.kirim.chat/v1/accounts?status=connected';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}use reqwest;
#[tokio::main]pub async fn main() { let url = "https://api.kirim.chat/v1/accounts";
let querystring = [ ("status", "connected"), ];
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Authorization", "Bearer <token>".parse().unwrap());
let client = reqwest::Client::new(); let response = client.get(url) .query(&querystring) .headers(headers) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request GET \ --url 'https://api.kirim.chat/v1/accounts?status=connected' \ --header 'Authorization: Bearer <token>'List the WhatsApp accounts attached to the calling organization. The returned business_phone_number_id is the value to use in /{phone_number_id}/... path-based endpoints (Meta-style — sender comes from the URL, not the body). Defaults to status=connected because that’s the only state in which sends are accepted; pass status=all to inspect onboarding-in-progress or disconnected accounts. Response is intentionally not paginated.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Responses
Section titled “ Responses ”Account list
object
object
Meta WhatsApp Business phone_number_id. Use as the {phone_number_id} path parameter in /v1/{phone_number_id}/... endpoints. Nullable while onboarding is in flight.
Lifecycle state of the account (e.g. connected, disconnected, degraded, onboarding).
Example
{ "data": [ { "object": "account", "phone_number_id": "106540352242922", "phone_number": "+628111222333", "name": "Customer Support", "status": "connected" } ]}Validation failure
object
object
Example
{ "error": { "type": "invalid_request_error", "code": "invalid_phone_number", "request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX" }}Authentication failure
object
object
Example
{ "error": { "type": "invalid_request_error", "code": "invalid_phone_number", "request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX" }}Rate limit exceeded
object
object
Example
{ "error": { "type": "invalid_request_error", "code": "invalid_phone_number", "request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX" }}Internal server error
object
object
Example
{ "error": { "type": "invalid_request_error", "code": "invalid_phone_number", "request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX" }}