{"record":{"id":"67a4afd8f0d6d06f","repo":"chatwoot/chatwoot","slug":"whatsapp-app-id-is-required","errorCode":null,"errorMessage":"WhatsApp App ID is required","messagePattern":"WhatsApp App ID is required","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"app/javascript/dashboard/routes/dashboard/settings/inbox/channels/whatsapp/Reauthorize.vue","lineNumber":113,"sourceCode":"    isRequestingAuthorization.value = false;\n    useAlert(\n      data.error_message ||\n        t('INBOX_MGMT.ADD.WHATSAPP.EMBEDDED_SIGNUP.SIGNUP_ERROR')\n    );\n  }\n};\n\nconst startEmbeddedSignup = authCode => {\n  const messageHandler = createMessageHandler(data =>\n    handleEmbeddedSignupEvents(data, authCode)\n  );\n  window.addEventListener('message', messageHandler);\n};\n\nconst handleLoginAndReauthorize = async () => {\n  // Validate required configuration\n  if (!whatsappAppId.value) {\n    throw new Error('WhatsApp App ID is required');\n  }\n  if (!whatsappConfigurationId.value) {\n    throw new Error('WhatsApp Configuration ID is required');\n  }\n\n  try {\n    const authCode = await initWhatsAppEmbeddedSignup(\n      whatsappConfigurationId.value\n    );\n\n    // Check if this is a reauthorization scenario where we already have the business data\n    const existingConfig = props.inbox.provider_config;\n    if (\n      existingConfig &&\n      existingConfig.business_account_id &&\n      existingConfig.phone_number_id\n    ) {\n      await reauthorizeWhatsApp({","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/chatwoot/chatwoot/blob/ed230f9bc068e7a13dd5c0404d5465a204b68d4c/app/javascript/dashboard/routes/dashboard/settings/inbox/channels/whatsapp/Reauthorize.vue#L95-L131","documentation":"Thrown by the WhatsApp 'Reauthorize' screen in the Chatwoot dashboard when handleLoginAndReauthorize() runs and window.chatwootConfig.whatsappAppId is falsy. The App ID is injected server-side into the vueapp layout from the installation config (GlobalConfigService loading WHATSAPP_APP_ID), and the Facebook embedded-signup flow cannot launch without it. Because the throw is not caught in the click handler, it surfaces as an uncaught promise rejection and the button silently does nothing.","triggerScenarios":"Clicking 'Reauthorize' or 'Complete registration' on a WhatsApp inbox while the installation has no WHATSAPP_APP_ID set (or it is the literal string 'none'/blank). The value comes from Super Admin > App Configs (WHATSAPP_APP_ID) rendered into window.chatwootConfig by vueapp.html.erb.","commonSituations":"Self-hosted install where only the cloud API provider was configured but not the embedded-signup env vars; the dashboard page was loaded before the admin saved the config and the cached window.chatwootConfig is stale; using a test/staging install cloned without the WhatsApp configuration secrets.","solutions":["Set WHATSAPP_APP_ID (and WHATSAPP_CONFIGURATION_ID, WHATSAPP_APP_SECRET) in installation config via Super Admin > App Configs > WhatsApp embedded signup, then hard-reload the dashboard so window.chatwootConfig is re-rendered","If self-hosting via env vars, set them and restart/redeploy so GlobalConfigService picks them up","Verify window.chatwootConfig.whatsappAppId in the browser console after reload to confirm the fix"],"exampleFix":"# before (installation config missing)\n# WHATSAPP_APP_ID not set -> clicking Reauthorize throws\n\n# after\n# Super Admin > App Configs > whatsapp_embedded\nWHATSAPP_APP_ID: '1234567890'\nWHATSAPP_CONFIGURATION_ID: 'abc-def'\n# then hard reload the dashboard page","handlingStrategy":"validation","validationCode":"const ready = Boolean(window.chatwootConfig?.whatsappAppId);\n// in component:\nif (!window.chatwootConfig?.whatsappAppId) {\n  useAlert(t('INBOX.REAUTHORIZE.WHATSAPP_APP_ID_MISSING'));\n  return;\n}\nhandleLoginAndReauthorize();","typeGuard":"function hasWhatsappAppId(cfg = window.chatwootConfig) {\n  return Boolean(cfg?.whatsappAppId) && cfg.whatsappAppId !== 'none';\n}","tryCatchPattern":null,"preventionTips":["Admins: set WHATSAPP_APP_ID in Super Admin > App Configs before enabling WhatsApp inboxes","Developers: gate the reauthorize button on hasWhatsappAppId() and show the existing WHATSAPP_APP_ID_MISSING alert instead of throwing an uncaught error","Hard-reload the dashboard after changing installation config so window.chatwootConfig is re-rendered"],"tags":["chatwoot","whatsapp","embedded-signup","missing-configuration","vue"],"backgroundTag":"missing-configuration","analyzedSha":"ed230f9bc068e7a13dd5c0404d5465a204b68d4c","analyzedAt":"2026-08-21T12:45:25.920Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}