Community编程与开发github.com

RabbitDesigns22/whatsapp-number-onboarding

在将客户或您自己的电话号码连接到 Meta Business 中的 WhatsApp Business 平台(Cloud API)时加载,或当已连接号码显示“已连接但收不到消息”、消息重复、模板失败或 Meta 阻止某个步骤时使用。提供安全步骤顺序(投资组合 → WhatsApp 帐户 → 号码 → 应用程序 → 令牌 → Webhook → 使用 PIN 注册 → 测试)、每一步后的回读检查,以及包含实际阻塞问题及其官方错误代码和修复方法的故障排除表,每个条目均标记为官方或现场测试。

whatsapp-number-onboarding 是什么?

该技能为开发者、AI代理用户或任何需要将电话号码成功接入Meta的WhatsApp Business Cloud API的人员提供指导。它提供了经过实战验证的逐步指南,以避免在配置WhatsApp Business账户、电话号码和Meta应用程序时常见的顺序错误和集成陷阱。该技能详细记录了真实世界中可能发生的阻塞问题,例如由于投资组合信息不完整、不同投资组合中的应用程序与WhatsApp Business账户不匹配或注册限制导致的失败,并为每个问题提供了带有明确标明的“官方”(来自Meta文档)或“现场测试”(已在实际环境中验证)置信度标签的已确认解决方案。它解释了关键的严格限制,例如每个投资组合在新注册时仅支持2个电话号码以及每72小时10次注册请求的限制,以防止遇到错误代码133016。该技能还强调了回读步骤的重要性,以确保每个配置(例如,电话号码状态显示“CONNECTED”和“CLOUD_API”,以及正确的Webhook订阅)已正确设置。它明确不涵盖使用Cloud API发送消息或模板的细节,并建议使用专门的参考技能来处理这些任务。 该技能支持通过基于关键词的触发器激活,关键词包括“connect WhatsApp to my app”、“onboard client number”、“WhatsApp Cloud API setup”、“number already registered”、“messages not arriving”、“conectar el WhatsApp del cliente”、“dar de alta el número”、“el bot no recibe mensajes”以及特定的Meta错误代码如“131042”和“133016”。它旨在解决用户在尝试连接WhatsApp号码时遇到的常见痛点,特别是当Meta界面显示已连接但实际消息传递失败时。用户应避免将此技能用于推销机器人或作为销售话术,因为这超出了其范围。通过遵循此指南,用户可以显著减少将WhatsApp号码接入Cloud API时的调试时间,确保从投资组合到消息传递的每个步骤都正确且稳健。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/RabbitDesigns22/whatsapp-number-onboarding/tree/HEAD/skills/whatsapp-number-onboarding

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

WhatsApp number onboarding (Meta Cloud API)

Connecting a number looks like 10 clicks. In practice it fails on the order of steps, on which portfolio owns what, and on Meta screens that say "connected" when nothing is delivered. This skill is the safe order plus the blocks that actually happened, with their fixes.

Confidence tags used below: [official] = stated on developers.facebook.com (URL in the table); [field] = happened in real onboardings and the fix was confirmed live; [unconfirmed] = seen, cause or fix never proven. Never present [field] or [unconfirmed] as Meta policy.

Words: never mix these four

  • Business portfolio (Business Manager): the company in Meta.
  • WhatsApp Business Account (WABA): lives inside a portfolio. In the UI, use the Messaging account ID, not the "WhatsApp account/presence" ID (the latter returns "This API is not supported") [field].
  • Phone number: lives inside a WABA. Its Phone number ID is not the phone number.
  • Meta app: lives in a developer account and is linked to a portfolio; it holds the token, app secret and webhook.

When you state a limit, say which of the four it is about.

Limits that decide the plan [official]

  • A new portfolio can register 2 phone numbers; the cap rises to 20 when the business is verified or reaches the 2,000 messaging limit.
  • Messaging limits are per portfolio, shared by all its numbers: 250 → 2,000 → 10,000 → 100,000 → unlimited. One busy number can use up everyone's allowance.
  • Register and deregister: 10 requests per number per 72 h each; past that, error 133016 and the number is blocked for 72 h. Do not hammer "Activate" while debugging.
  • Adding a number in WhatsApp Manager or the app dashboard does not register it for Cloud API; the register call is still needed.
  • A number already used with WhatsApp (phone app) cannot be registered until that account is deleted.
  • Deleting a number: portfolio admins only, not via API, needs the 2-step PIN if connected, and is impossible if it sent paid messages in the last 30 days. Treat deletion as irreversible.

Before starting (collect once)

Business name exactly as customers will see it, legal name, country, full address, phone, website or Facebook page, email, logo, and the number to connect. The number must not have WhatsApp installed (if it does, delete the WhatsApp account on that phone first). Decide who invents and keeps the 6-digit PIN.

Safe order (each step ends with a read-back)

  1. Portfolio (business.facebook.com): fill Business info completely (legal name, address, phone, website) before adding a number. With it empty, onboarding failed with "your business doesn't meet WhatsApp policy" (#2494070) [field].
  2. WhatsApp account + number (Portfolio settings → Accounts → WhatsApp accounts → Add → new number). Display name = the client's business name, never the agency's. Verify by SMS, or VOICE for landlines [official]. Read back: the number appears under the WABA.
  3. Meta app (developers.facebook.com → Create app → WhatsApp use case), linked to the same portfolio that owns the WABA. App in one portfolio and WABA in another: everything showed green and no message was delivered; moving the app into the WABA's portfolio fixed it [field]. Settings → Basic: privacy/terms/data-deletion URLs that return 200, category, icon.
  4. System user in that portfolio with the app and the WABA as assets; token with whatsapp_business_messaging + whatsapp_business_management, no expiry. A human pastes the token where it is stored; never echo it.
  5. IDs, read by you, not typed by a person: GET /{waba-id}/phone_numbers → Phone number ID. Storing the phone number in the Phone-number-ID variable broke a bot [field].
  6. Environment variables in the exact hosting project. Several client projects with the same variable names: say the project name and check the title before saving. One client's IDs went into another's project and its live bot pointed to the wrong number [field].
  7. Webhook (app → WhatsApp → Configuration): https://<domain>/webhook plus verify token; subscribe the messages field (it is not always on). Then subscribe the WABA to the app: POST /{waba-id}/subscribed_apps.
  8. Register the number: POST /{phone-number-id}/register with the 6-digit PIN. If the number already has 2-step verification, use the existing PIN [official]. Read back: GET /{phone-number-id}?fields=status,platform_type,name_status → CONNECTED and CLOUD_API. Before this it shows PENDING / NOT_APPLICABLE [field].
  9. Publish the app, then send "Hi" from a personal phone and see the bot answer.
  10. Billing: payment method, timezone and currency set on the WhatsApp account before sending templates (131042 otherwise) [official].
  11. Final read-back: number status, GET /{waba-id}/subscribed_apps shows only this app, webhook URL and fields, debug_token shows the right app and a system-user token.

The display name can stay "in review" for days while the number already works [field]; do not click Edit, because editing restarts the review.

Golden rules

  • Same portfolio for the app and the WABA. If the client's own portfolio is stuck in review, a field-tested way out is to put the number in a WABA in a portfolio that works (yours), with the app in that same portfolio, inside the 2-number cap [field]. The official long-term path is becoming a Tech Provider with Embedded Signup.
  • One app per client, by default. The app's callback URL is the default destination. Meta supports per-WABA and per-number webhook overrides [official], but if you have not tested them, keep one app per client.
  • When the hosting domain changes, update the webhook in Meta at that moment and read it back. A domain change silently stopped a bot [field].
  • Never use the "Continue" path that installs the WhatsApp Business app on the phone for a number that should stay on Cloud API: it takes the number off the API [field].
  • Try what breaks nothing first. Deregistering, deleting or moving a number come last, only if Meta requires it (see the limits above).
  • A health check is green only when Meta says so: read the phone status from Meta. A valid token proves nothing about the number [field].
  • A redirect to a portfolio's URL does not prove who owns an asset. Confirm the portfolio name on screen [field].

Troubleshooting

SymptomCauseFixTag / source
All green, nothing arrivesApp and WABA in different portfoliosNew app in the WABA's portfolio; remove the old app's webhook[field]
Messages arrive twice / "app secret mismatch" warningsTwo apps subscribed to the same WABARemove the old app's webhook and subscription[field]
Bot stopped after a deployWebhook still on the old domainUpdate the webhook and read it back[field]
"No se pudo asignar el socio" (assign partner) when the client shares its WABANever proven (new or unverified portfolio, account under review)Avoid the share: build in one portfolio (see the golden rules)[unconfirmed] cause, [field] workaround
"Business doesn't meet WhatsApp policy" (#2494070) during developer onboardingIncomplete business info / new portfolioComplete the business info; add the number from WhatsApp Manager instead[field]
"This API is not supported" with the WABA IDUsed the "WhatsApp account" IDUse the Messaging account ID[field]
Status PENDING, platform NOT_APPLICABLEAdded but not registeredPOST /register with PIN[official] + [field]
133005Wrong 2-step PINUse the number's existing PINerror codes
133006Number not verifiedVerify by SMS/VOICE, then registererror codes
133008 / 133009Too many or too fast PIN attemptsWait the time in detailserror codes
133010Number not registered on the platformRegister iterror codes
133015Number recently deleted, still deletingWait 5 minuteserror codes
133016Over 10 register/deregister requests in 72 hStop; wait for the block to endregistration
133000A previous deregistration failedDeregister again, then registererror codes
"Number already has WhatsApp"Number still on the phone app or another accountDelete that WhatsApp account firstphone numbers
131042 on templatesPayment method: credit line, timezone or currency not set, account suspendedFix billing in WhatsApp Manager; show the user Meta's error_data.details text, not a guesserror codes
131042 on a few recipients onlyAccount-wide per Meta's text, yet in one live check 16 of 18 templates were deliveredCount delivered vs failed in the same period before calling it account-wide or pausing anything[field] heuristic
131049Not delivered "to maintain healthy ecosystem engagement"Wait at least 24 h before resendingerror codes
131026Recipient can't receive (no WhatsApp, old version, terms)Reach them another wayerror codes
131031WABA restricted for a policy violationSee Policy Enforcement and the Health Status APIerror codes
Can't link the number to the Facebook page for click-to-WhatsApp adsDisplay name still in review (likely)Wait for approval, then Page → Linked accounts → WhatsApp[unconfirmed]

Other official pages: get started · messaging limits · webhook overrides.

Not verified (say so if it comes up)

  • What "No se pudo asignar el socio" really requires.
  • Whether a brand-new, unverified portfolio may create a WABA at all.
  • Moving a number between WABAs: Meta's guide says it is not supported for accounts on the new account model; it was never completed in the field.
  • Official display-name review times. The two official URLs returned 404 in Nov 2026.

Who does what

The agent does every screen and API check it can. The person only provides what a machine cannot: the SMS/voice code from the phone, the PIN, pasting secrets, identity checks, payments.

相关技能