Skip to content

Embedded Signup for creating a WhatsApp Sender

Before creating the Embedded Signup (ES) sender, the end customer must connect their Meta account to the Multi-Partner Solution (MPS). This can be achieved via Sinch Build, or by using Provisioning API and Meta.

Creating a sender

Prior to calling the create sender endpoint, ensure that you have your WhatsApp Business Account (WABA) ID (wabaId) and the phone number associated with the WABA (phoneNumberId) readily available. The remaining WABA details will be fetched automatically when calling the create sender endpoint.

async function createSender() {
  const resp = await fetch(
    `https://provisioning.api.sinch.com/v1/projects/${PROJECT_ID}/whatsapp/senders`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        Authorization:
          'Basic ' +
          Buffer.from(ACCESS_KEY + ':' + ACCESS_SECRET).toString('base64'),
      },
      body: JSON.stringify({
        region: 'EU',
        metaLocalStorage: 'DE',
        wabaId: WABA_ID,
        phoneNumberId: PHONE_ID,
      }),
    }
  );

  const data = await resp.json();
  return data;
}

Next steps

If the call is successful, the sender will move transition through various states. If there are no issues, the sender will eventually become ACTIVE. Once the sender is ACTIVE, you can create templates for the sender.

State transitions for ES Senders

IN_PROGRESS

ERROR

ACTIVE

SUSPENDED

INACTIVE

Will stay in INACTIVE for up to 30 days

IN_PROGRESS

ERROR

ACTIVE

SUSPENDED

INACTIVE

Will stay in INACTIVE for up to 30 days

We'd love to hear from you!
Rate this content: