Fetch WhatsApp Accounts
warning
Inbox management is not available on the Basic plan. Upgrade to Intermediate, Growth or Business plan to access this endpoint.
Overview
The Fetch WhatsApp Accounts endpoint returns the connected WhatsApp business phone numbers owned by the authorized user. Use the returned social_account_id with the other WhatsApp endpoints.
Base URL:
https://message.oneupapp.io
Endpoint
GET /api/whatsapp/accounts
Request Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
apiKey | Yes | string | Your personal API key generated from the API Access page. Passed as a query parameter. |
Sample Request
curl --location --request GET \
"https://message.oneupapp.io/api/whatsapp/accounts?apiKey=YOUR_API_KEY"
Sample Response
{
"message": "OK",
"error": false,
"data": [
{
"social_account_id": "104040148726689",
"name": "My Business",
"waba_id": "112233445566778"
}
],
"meta": []
}
Response Fields
| Field | Description |
|---|---|
social_account_id | The WhatsApp business phone_number_id. Pass this value to WhatsApp conversation, contact, and template endpoints. |
name | The saved WhatsApp business account name, or null when unavailable. |
waba_id | The WhatsApp Business Account ID. |
Only connected accounts owned by the authorized user are returned. Access tokens and internal database IDs are excluded.
Use the selected account's social_account_id to fetch its contacts and fetch its approved templates.
Error Responses
| Status | When |
|---|---|
401 | Missing or invalid apiKey. |
403 | Inbox management is unavailable on the Basic plan or has not been enabled for the account. |
429 | The limit of 60 requests per minute per API key was exceeded. Wait for the Retry-After interval. |
503 | API key verification is temporarily unavailable. |
✅ Result: You have the social_account_id needed by the WhatsApp endpoints!