WhatsApp· 7 min read

Migrate to Embedded Signup v5: waba_id, coexistence and errors


Embedded Signup v5, released October 20, 2026, changes two things. WhatsApp Business app onboarding (coexistence) is on by default, and the session event now carries messaging_account_ids instead of waba_id. Meta says that array “returns the IDs waba_id returned before”, so most of the migration is a field rename in your message handler. If you can’t serve Business app numbers, opt out in extras. A number already on WhatsApp then returns error 3441070 instead of the v5 default, 3441069.

Versions 2 and 3 stopped on October 15, 2026, and requests for them now run as v4. The full flow, from launch to code exchange, subscribed_apps and number registration, is in onboard client WhatsApp accounts with Embedded Signup. This page covers only what changes when you set version: "v5".

Which version your flow runs today

Meta’s Embedded Signup versions page (accessed 2026-11-24) lists these dates:

Version Introduced Available until
v5 and v5-public-preview October 20, 2026 TBD
v4-public-preview May 12, 2026 TBD
v4 October 8, 2025 TBD
v3 and v3-public-preview May 29 and August 14, 2025 October 15, 2026
v2 and v2-public-preview January 2023 and August 14, 2025 October 15, 2026

Requests for v2 or v3, and requests with no version or an invalid one, “are served as v4”. Meta adds that “Features with no v4 equivalent no longer apply.” A launch call that asks for v2 or v3, or sets no valid version, is therefore a v4 integration now.

featureType: "only_waba_sharing", the v2 WABA-only sharing mode, kept working until November 16, 2026, and is gone now. The finish types FINISH_ONLY_WABA and FINISH_GRANT_ONLY_API_ACCESS are marked as sent only by v2. If your handler branches on them, those branches no longer run.

On v4 and v5, the products the client grants come from your Facebook Login for Business configuration. To see what an existing call resolves to, open the App Dashboard and go to WhatsApp > Embedded Signup Builder > Check a launch config. The versions page mixes tenses, saying v2 and v3 “will be deprecated” in one warning and “were deprecated” elsewhere. Go by the dates in the table.

What v5 changes in the launch call

The v5 page (accessed 2026-11-24) says “v5 makes two changes to Embedded Signup.” Coexistence is on by default, and “the session info object uses version 5 instead of version 3.” Meta adds: “Everything else works as in v4: products come from your Facebook Login for Business configuration.”

On v4, coexistence needed featureType: "whatsapp_business_app_onboarding" in extras. On v5, Meta’s sample is only the version:

extras: {
    version: "v5"
}

v5-public-preview is v5 “with the preview UI”. Meta calls its defaults, opt-out and session info “identical to v5”, so the only code difference is the version string. Passing sessionInfoVersion has no effect on v5.

If you don’t support Business app numbers, use Meta’s opt-out:

extras: {
    version: "v5",
    features: [
      {
        name: "whatsapp_business_app_onboarding",
        enabled: false
      }
    ]
}

“The opt-out applies even if you also pass featureType: "whatsapp_business_app_onboarding".” Clean the old featureType out anyway, so the next reader of your code isn’t misled.

Read session info version 5

This is Meta’s v5 finish event for a Business app number:

{
  "data": {
    "phone_number_id": "<PHONE_NUMBER_ID>",
    "is_on_biz_app": true,
    "messaging_account_ids": ["<MESSAGING_ACCOUNT_ID>"],
    "primary_waac_ids": [],
    "page_ids": [],
    "catalog_ids": [],
    "dataset_ids": [],
    "business_id": "<BUSINESS_PORTFOLIO_ID>",
    "instagram_account_ids": []
  },
  "type": "WA_EMBEDDED_SIGNUP",
  "event": "FINISH_WHATSAPP_BUSINESS_APP_ONBOARDING"
}

The fields that differ from session info version 3:

Version 3 (v4 and older) Version 5 What Meta says
waba_id (string) messaging_account_ids (array) “Messaging accounts shared with you. Replaces waba_id.”
Not present is_on_biz_app “true when the business onboarded a WhatsApp Business app number.”
Not present primary_waac_ids “Empty until WhatsApp account IDs are available in the Graph API.”
event set to a finish type FINISH or FINISH_WHATSAPP_BUSINESS_APP_ONBOARDING The second when is_on_biz_app is true

Meta defines a WhatsApp account (WAAC) as the object that “holds the business phone number and profile”. Store primary_waac_ids if you like, but nothing reads it yet. CANCEL and ERROR events are “unchanged from session info version 3”, so that part of your handler stays.

The v3 payload carried waba_ids, “only included for multi-WABA flows”, and the v5 sample has no such field. Meta’s sample also omits ad_account_ids. Neither page says whether Meta removed these fields or left them out of the example.

A browser page that accepts both shapes

During the rollout you may have clients on cached pages still running v4. This page reads messaging_account_ids first and falls back to waba_id. It waits for both the code and the finish event before calling your server, because the two arrive through separate channels.

<!DOCTYPE html>
<html>
<head><meta charset="utf-8"><title>Connect WhatsApp</title></head>
<body>
<button id="connect">Connect WhatsApp</button>
<script>
  const pending = { code: null, info: null };

  // Codes from Meta's errors page. Meta doesn't say whether they reach the ERROR event or only the popup; log error_code to confirm.
  const ERROR_HINTS = {
    3441069: "This number is on WhatsApp. Move it to the WhatsApp Business app, or use another number.",
    3441070: "This number is already in use on WhatsApp. Enter a different number.",
    3441072: "This number is on the WhatsApp Business app, which this flow does not connect.",
  };

  function isFacebookOrigin(origin) {
    try {
      const host = new URL(origin).hostname;
      return host === "facebook.com" || host.endsWith(".facebook.com");
    } catch {
      return false;
    }
  }

  function normalize(event, data) {
    let ids = [];
    if (Array.isArray(data.messaging_account_ids) && data.messaging_account_ids.length > 0) {
      ids = data.messaging_account_ids;
    } else if (data.waba_id) {
      ids = [data.waba_id];
    }
    return {
      messagingAccountIds: ids,
      phoneNumberId: data.phone_number_id || null,
      businessId: data.business_id || null,
      isOnBizApp: data.is_on_biz_app === true || event === "FINISH_WHATSAPP_BUSINESS_APP_ONBOARDING",
    };
  }

  async function sendToServer() {
    if (!pending.code || !pending.info) return;
    const body = { code: pending.code, ...pending.info };
    pending.code = null;
    pending.info = null;
    const res = await fetch("/api/embedded-signup", {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify(body),
    });
    console.log("server responded", res.status);
  }

  window.addEventListener("message", (event) => {
    if (!isFacebookOrigin(event.origin)) return;
    let msg;
    try {
      msg = JSON.parse(event.data);
    } catch {
      return;
    }
    if (msg.type !== "WA_EMBEDDED_SIGNUP") return;
    const data = msg.data || {};

    if (msg.event === "FINISH" || msg.event === "FINISH_WHATSAPP_BUSINESS_APP_ONBOARDING") {
      const info = normalize(msg.event, data);
      if (info.messagingAccountIds.length === 0) {
        console.error("finish event without account IDs", msg);
        return;
      }
      pending.info = info;
      sendToServer();
    } else if (msg.event === "CANCEL") {
      console.warn("cancelled at step", data.current_step);
    } else if (msg.event === "ERROR") {
      console.error("signup error", data.error_code, data.error_message, data.session_id);
      const hint = ERROR_HINTS[Number(data.error_code)];
      if (hint) alert(hint);
    }
  });

  function fbLoginCallback(response) {
    if (response.authResponse && response.authResponse.code) {
      pending.code = response.authResponse.code;
      sendToServer();
    }
  }

  window.fbAsyncInit = function () {
    FB.init({ appId: "<APP_ID>", autoLogAppEvents: true, xfbml: true, version: "v26.0" });
  };

  document.getElementById("connect").addEventListener("click", () => {
    FB.login(fbLoginCallback, {
      config_id: "<CONFIGURATION_ID>",
      response_type: "code",
      override_default_response_type: true,
      extras: { version: "v5" },
    });
  });
</script>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js"></script>
</body>
</html>

Serve it over HTTPS from a domain allowed in your app settings, with the server below behind the same origin (for example through a reverse proxy). The hostname check is stricter than Meta’s endsWith('facebook.com'), which would also accept a host such as notfacebook.com.

Subscribe every account ID before you do anything else

The silent failure in a v5 migration is a missing subscribed_apps call. If your server still reads waba_id, it gets undefined, skips the subscription, and the client’s messages never reach your webhook. Nothing errors.

Public pull requests show this pattern. chatwoot/chatwoot#16691, opened November 17, 2026 and still open, moves to version: 'v5' and reads messaging_account_ids. It rejects a result without that field as invalid. In Let-s-Meet#64, a user reports that skipping the field would have skipped the webhook subscription. The author says that fix is untested against a live Meta flow.

This Node.js server exchanges the code and subscribes each account. Meta’s implementation page (accessed 2026-11-24) now says “The exchangeable token code has a time-to-live of 5 minutes”. Older guides, including ours, said 30 seconds.

// embedded-signup-server.js
// Node 18 or later. Run: APP_ID=... APP_SECRET=... node embedded-signup-server.js
const http = require("node:http");

const GRAPH = "https://graph.facebook.com/v26.0";
const { APP_ID, APP_SECRET } = process.env;

async function exchangeCode(code) {
  const url = new URL(`${GRAPH}/oauth/access_token`);
  url.searchParams.set("client_id", APP_ID);
  url.searchParams.set("client_secret", APP_SECRET);
  url.searchParams.set("code", code);
  const res = await fetch(url);
  const body = await res.json();
  if (!res.ok || !body.access_token) {
    throw new Error(`code exchange failed: ${JSON.stringify(body)}`);
  }
  return body.access_token;
}

async function subscribe(accountId, token) {
  const res = await fetch(`${GRAPH}/${accountId}/subscribed_apps`, {
    method: "POST",
    headers: { Authorization: `Bearer ${token}` },
  });
  const body = await res.json();
  if (!res.ok || body.success !== true) {
    throw new Error(`subscribed_apps failed for ${accountId}: ${JSON.stringify(body)}`);
  }
}

http
  .createServer((req, res) => {
    if (req.method !== "POST" || req.url !== "/api/embedded-signup") {
      res.writeHead(404).end();
      return;
    }
    let raw = "";
    req.on("data", (chunk) => {
      raw += chunk;
    });
    req.on("end", async () => {
      try {
        const { code, messagingAccountIds, phoneNumberId, isOnBizApp } = JSON.parse(raw);
        if (!code || !Array.isArray(messagingAccountIds) || messagingAccountIds.length === 0) {
          throw new Error("missing code or account IDs");
        }
        const token = await exchangeCode(code);
        for (const id of messagingAccountIds) {
          await subscribe(id, token);
        }
        // Save token, messagingAccountIds, phoneNumberId and isOnBizApp to your database here.
        console.log("onboarded", { messagingAccountIds, phoneNumberId, isOnBizApp });
        res.writeHead(200, { "Content-Type": "application/json" }).end(JSON.stringify({ ok: true }));
      } catch (err) {
        console.error(err.message);
        res.writeHead(400, { "Content-Type": "application/json" }).end(JSON.stringify({ ok: false }));
      }
    });
  })
  .listen(3000);

Registration and the payment method come next, as in the Embedded Signup guide. Since the IDs are the same values, any table keyed on waba_id keeps working. Rename the column when you have time, not as part of the cutover.

Decide on coexistence before you ship v5

Turning on v5 without the opt-out means some clients will onboard numbers that live on the WhatsApp Business app. Those numbers come with work your app has to do. You have 24 hours to sync contacts and history, extra webhook fields to subscribe, and features that stop working on the number. The details are in the WhatsApp Business app and Cloud API guide and coexistence onboarding errors.

If you support it, branch on is_on_biz_app or the event name and start the sync job from the same request that stores the token. If you don’t, ship the opt-out in the same release as the version change. Shipping v5 first and the opt-out later leaves a window where clients onboard numbers your backend can’t handle.

Error codes that depend on your choice

The coexistence switch changes which error a client sees when the number is already on WhatsApp. These are from Meta’s Embedded Signup errors page (accessed 2026-11-24), which carries no dates:

Code Message When Meta returns it Fix Meta gives
3441069 “This number is already registered on WhatsApp.” The number is on WhatsApp, not the Business app, and “you support onboarding WhatsApp Business app users” Move the number to the Business app and connect as a Business app user, or use another number
3441070 “This number is already in use on WhatsApp or the WhatsApp Business app.” The number is in use, and “you don’t support onboarding WhatsApp Business app users” “Your client can enter a different number, or delete the WhatsApp account on the number first.”
3441072 “This number is on the WhatsApp Business app, and this partner can’t connect Business app numbers yet.” The partner doesn’t support Business app numbers Not stated on the page
2494064 “This phone number is already registered to a WhatsApp account.” Older generic code Deregister the number or register a new one

With coexistence on, a number on personal WhatsApp produces 3441069, and the client can fix it by moving to the Business app. With the opt-out, the same number produces 3441070, and the only fix is a different number or deleting the account. Meta’s page doesn’t say exactly when a Business app number returns 3441070 rather than 3441072, so map both.

Meta now frames 2494064 as an older code and says more specific codes are usually returned. Keep it in your map for older sessions.

Where Meta’s own pages disagree

Meta’s coexistence page (accessed 2026-11-24) still shows "sessionInfoVersion": "3" and a finish payload with data.waba_id. The same page says “On v5, WhatsApp Business app onboarding is on by default, so featureType is not needed.” Follow the v5 page for payload shapes.

The implementation page tells you to set the SDK version to “v27.0”. Meta’s Graph API versions table tops out at v26.0, and the Tech Provider page sample still calls v21.0/oauth/access_token. The code above uses v26.0. The Tech Provider steps that come before any of this are in become a WhatsApp Tech Provider. Why v21.0 needs replacing is in Graph API v21.0 and v22.0 retirement.

What Meta has not documented

Meta gives no v4-to-v5 migration guide. It doesn’t say when primary_waac_ids will be filled in, or whether the multi-WABA waba_ids array survives in v5. It lists no error code specific to v5. Both v4 and v5 show “TBD” as their end date, so nothing forces the move today.

It also doesn’t describe a v5 session that still sends featureType: "only_waba_sharing". Treat that combination as undefined and remove the old value. Recheck the v5 page before each release, since its examples and the coexistence page have already drifted apart.

Z-API Omni team