Skip to main content

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​

ParameterRequiredTypeDescription
apiKeyYesstringYour 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​

FieldDescription
social_account_idThe WhatsApp business phone_number_id. Pass this value to WhatsApp conversation, contact, and template endpoints.
nameThe saved WhatsApp business account name, or null when unavailable.
waba_idThe 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​

StatusWhen
401Missing or invalid apiKey.
403Inbox management is unavailable on the Basic plan or has not been enabled for the account.
429The limit of 60 requests per minute per API key was exceeded. Wait for the Retry-After interval.
503API key verification is temporarily unavailable.

✅ Result: You have the social_account_id needed by the WhatsApp endpoints!