WhatsApp Business
Sending WhatsApp Business messages from the app and managing message templates, for example booking confirmations and appointment reminders.
Connection type: For the app and the agent. Credentials: Access token (system user), Phone number ID.
How it works
The app and the agent never see the credentials. They call the WhatsApp Business API through the Bloklo gateway, for example fetch("/gw/<connection id>/{phone_number_id}?fields=display_phone_number,verified_name,quality_rating"). The gateway appends the path to the address https://graph.facebook.com/v27.0, adds an Authorization: Bearer … header with the key from the connection, and passes the service's response back to the app.
- Reads (GET) go through at once. Writes (POST, PUT, PATCH, DELETE) go through at once only when the connection is set to Always allow; otherwise the gateway returns status 202 with an
approval_idand the write waits for approval in the panel (see Agent permissions). - The Test button sends
GET /{phone_number_id}?fields=display_phone_number,verified_name,quality_ratingand checks that the service accepted the credentials.
Cloud API on the Graph API, JSON body. Outside 24 hours after the recipient's last message only an approved template may be sent; inside the window other message types are allowed too. A response with a message id means acceptance, not delivery: statuses arrive by webhook.
Before you start
- An account with WhatsApp Business with permission to create API keys or tokens.
Where to get the credentials
- In Meta for Developers (
developers.facebook.com), create an app with the Connect with customers through WhatsApp use case and choose your business portfolio. - In the app, open WhatsApp → API Setup: Meta shows the Phone number ID and the WhatsApp Business Account ID there. Copy both into the Bloklo form.
- Permanent token: in Meta Business Suite → Business settings → Users → System users, add a system user, assign it the app (Manage app) and the WhatsApp account with full control.
- Click Generate token, choose the app and the
whatsapp_business_messaging,whatsapp_business_managementandbusiness_managementpermissions, then copy the token. - The temporary token from API Setup is only good for a first try: it expires within hours.
- Messages to people who have not written to the business in the last 24 hours require a template approved by Meta (created in WhatsApp Manager or by the agent).
Meta charges for each delivered template message. A new account can message 250 different people per day; the limit grows after business verification. The recipient must have opted in to messages.
WhatsApp Business documentation
Connecting in Bloklo
- Open Connectors in the sidebar and find WhatsApp Business.
- Click Connect and enter a connection name in Details.
- In Configure connection, fill in: Access token (system user), Phone number ID, WhatsApp Business Account ID (WABA ID).
- Click Connect. Bloklo saves the credentials encrypted and sends a test request; the message shows whether the service responded.
- Attach the connection to a project: Attach to a project… on the connection page, or describe the task in the project chat and pick the connection the agent suggests.
Form fields
- Access token (system user): A system user token from Meta Business Suite. The temporary token from API Setup expires within hours.
- Phone number ID: The number shown in API Setup in the Meta app. It is not the phone number itself.
- WhatsApp Business Account ID (WABA ID) (optional): Needed to read and create message templates.
Never paste credentials into the chat with the agent. Enter them only in the connection form.
Example prompts
Prompts to type in the chat of a project with the connection attached:
- “Send the customer an order confirmation on WhatsApp from an approved template.”
- “Add a page showing message template statuses and number quality.”
API methods
The most commonly used WhatsApp Business API methods. The path goes after /gw/<connection id>; parts in braces, such as {id}, are replaced with values. The gateway treats every request other than GET as a write, including queries sent with POST (such as search or GraphQL), so they need approval unless the connection is set to Always allow. The full list of methods is in the provider's documentation.
| Method | Path | What it does | In the gateway |
|---|---|---|---|
POST | /{phone_number_id}/messages | Send a message (text, template, media) | write (approval) |
GET | /{phone_number_id}?fields=display_phone_number,verified_name,quality_rating | Number details and quality | read |
GET | /{waba_id}/message_templates | List message templates | read |
POST | /{waba_id}/message_templates | Create a message template | write (approval) |
GET | /{template_id}?fields=status | Template approval status | read |
GET | /{waba_id}/phone_numbers | List WhatsApp Business account numbers | read |
Service limits
Throughput: 80 messages per second per number by default (eligible numbers are raised to 1,000; numbers used with the WhatsApp Business app 20); exceeding returns error 130429. Outside the 24-hour window the number of distinct recipients per day for the whole portfolio: 250 at the start, then 2,000, 10,000, 100,000, unlimited (increase after business verification or after sending high-quality templates). Template creation: up to 100 per hour per account. Template review takes up to 24 hours; only templates with status APPROVED can be sent.
WhatsApp Business API reference
Agent actions and permissions
| Action | Type | What the agent uses it for |
|---|---|---|
| Read data | read | Fetches data from the service, such as a list of records, to build and check the app. Examples: number details and quality; list message templates; template approval status. |
| Write data | write | Requests other than GET: creating, changing or deleting data in the service, and also queries sent with POST (such as search). Examples: send a message (text, template, media); create a message template. |
By default, reads run without asking and writes need approval in the chat. Change this on the connector page or in Settings → Agent permissions (see Agent permissions).
Troubleshooting
The connection test shows “Invalid key” (HTTP 401)
The service did not recognise the credentials: the value is wrong, expired, revoked or was copied with a space. Create a new key at the provider and enter it on the connection page under Change credentials. Empty fields stay unchanged.
The connection test shows “Invalid key” (HTTP 403)
The credentials are rejected or lack the needed permissions, or the service only accepts requests from selected IP addresses. Check the key, extend its permissions at the provider or add the Bloklo gateway IP address (shown in Settings → Privacy & security) to the allowlist.
The test returns another HTTP code
The Test button sends the service a read request that requires valid credentials. A code other than 401 and 403 usually means a temporary problem at the service or a restriction on the account at the provider; include the error code shown with the result in a problem report.
Limits and security
- One connection can make up to 1,000 requests per minute; the service's own limits also apply.
- Credentials are encrypted and not shown in the browser after saving; only the names of stored fields are visible.
- A published app works for every visitor: protect the data the connection gives access to with sign-in in the app.
Something unclear or out of date? Contact us