Get WhatsApp Business account
Get WhatsApp Business account: getWhatsappBusinessAccount in the TypeScript, Python, Rust and Go clients.
GET /v1/projects/{id}/platforms/whatsapp-business/account
Gets the one WhatsApp Business Account this project has connected, with its number of live senders. Senders are resources and are listed by GET /platforms/resources?ability=whatsapp_business. The account is not a resource and carries no access token. Meta's retained numbers are listed separately by GET /platforms/whatsapp-business/account/phone-numbers. subscribedAt is absent until our app is attached to the account's webhooks. Requires the platforms:read permission bound to the project resource in the path.
photon.projects.platforms.getWhatsappBusinessAccount(input: GetWhatsappBusinessAccountInput, options?: RequestOptions): Promise<GetWhatsappBusinessAccountOutput>photon.projects.platforms.get_whatsapp_business_account(input: GetWhatsappBusinessAccountInput, *, options: RequestOptions | None = None) -> models.WhatsappBusinessAccountclient.get_whatsapp_business_account(id: String).await -> Result<ResponseValue<types::WhatsappBusinessAccount>, Error<GetWhatsappBusinessAccountError>>client.Projects.Platforms.GetWhatsappBusinessAccount(ctx context.Context, params *GetWhatsappBusinessAccountParams, opts ...RequestOption) (*WhatsappBusinessAccount, error)import { Photon } from "@photon-ai/api";
const photon = new Photon({
headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.platforms.getWhatsappBusinessAccount({
path: {
id: "id",
},
});import os
from photon_api import Photon
from photon_api.rpc_generated import GetWhatsappBusinessAccountInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.projects.platforms.get_whatsapp_business_account(
GetWhatsappBusinessAccountInput.model_validate({
"path": {
"id": "id",
},
})
)use photon_ai_api::{Credential, PhotonClientBuilder, SecretString};
let token = std::env::var("PHOTON_API_TOKEN")?;
let client = PhotonClientBuilder::new()
.credential("accountServiceKey", Credential::Bearer(SecretString::from(token)))
.build()?;
let result = client
.get_whatsapp_business_account("id".to_owned())
.await
.map_err(|error| format!("{error:?}"))?
.into_inner();import (
"context"
"os"
photonapi "github.com/photon-hq/api/packages/go"
)
ctx := context.Background()
client := photonapi.NewClient(photonapi.WithAPIKey(os.Getenv("PHOTON_API_TOKEN")))
result, err := client.Projects.Platforms.GetWhatsappBusinessAccount(ctx, &photonapi.GetWhatsappBusinessAccountParams{
ID: "id",
})
if err != nil {
return err
}
_ = result{
"accountName": null,
"alerts": [
{
"description": "string",
"entityId": "string",
"entityType": "string",
"observedAt": "2026-01-01T00:00:00.000Z",
"severity": "string",
"status": "string",
"type": "string"
}
],
"businessId": "string",
"businessName": null,
"connectedAt": "2026-01-01T00:00:00.000Z",
"maxPhoneNumbersPerBusiness": 0,
"outboundCapacity": "50",
"restriction": null,
"reviewStatus": "PENDING",
"senderCount": 0,
"subscribedAt": "2026-01-01T00:00:00.000Z",
"wabaId": "string"
}Parameters
Selects the API contract date. Without it, the request is served as 2026-07-01.
Returns
200 The project's connected account. WhatsappBusinessAccount
Headers: ETag, Photon-Version. The raw response carries these headers; see Raw responses.
304 Not Modified. Sent only when If-None-Match matches the ETag of an earlier 200 response for the same representation; no body. No body.
Headers: ETag, Photon-Version. The raw response carries these headers; see Raw responses.