Skip to main content
Each tenant connects its own WhatsApp Business Account and phone number. The tenant signs in to Meta and allows ImpelLabs to use the number. The account and the number stay with the tenant, and its payment method for WhatsApp is on its own Meta account. Reading needs channels:read. Connecting needs channels:write. You can connect in two ways. The hosted sign-up needs the least work from you.

Hosted sign-up

ImpelLabs hosts a page that runs Meta’s sign-up for the tenant. You send the tenant a link.
1

Set the return address once

In the partner console, set the WhatsApp return address under Brand and domain. It must start with https://. A request without it answers 409 with the code no_return_url. A request cannot set the address.
2

Make a sign-up link

The answer is 201:
The link works once and expires after 15 minutes. It is for one tenant. state is optional text, 512 characters at most. It comes back to you on the return address. If WhatsApp sign-up is not set up on the server, the call answers 503.
3

Send the tenant to the link

The page asks the tenant to choose one of two things. The tenant can use the number that is on its WhatsApp Business app, and the app keeps working on its phone. Or the tenant can connect a new number, which needs a code by text or call. A tenant who needs a PIN for the number types it on the page. The PIN is used once and is not kept.
4

Receive the result

The page sends the tenant to your return address with status (connected, cancelled or failed), your state, and a reason when it failed. ImpelLabs also sends the event channel.connected to your webhook endpoint, also when the tenant closes the page before the redirect. Do not depend on the redirect alone.
channel.connected carries phone_number_id, waba_id, display_phone_number, verified_name, activated and coexistence.

Sign-up in your own page

You can open Meta’s sign-up in your own page instead. First read the settings:
The answer has app_id, config_id, graph_version and server_ready. If server_ready is false, sign-up is not set up on this server. Use the values to open the Meta window. When it ends, send the code from your server:
code and waba_id are required. phone_number_id is the number to connect. Without it, the first number of the account is used. The code works once, so do not repeat this call blindly. If you lose the answer, read the channel with GET on the same path. A number that needs a PIN answers 409 with field set to pin. This route cannot finish that step, so use the hosted sign-up for such a number. The answer of both GET and POST holds configured and the numbers that are connected.

A connected number does not answer yet

A new number has the status pending. Switch an agent on:
assistant_id is the id of an agent in the workspace of the tenant. See Get an agent id. The number becomes active. Send { "on": false } to pause it. A paused number keeps its connection. When the tenant has more than one number and no agent answers on this one, the call answers 400 no_binding. Send "force": true to switch it on anyway. An archived agent answers 400 assistant_archived. A number whose connection failed answers 409. Reconnect it first.

Next

See Numbers to manage the numbers of a tenant, and Syncing for the chats that come from the WhatsApp Business app.