{"id":2201,"date":"2026-11-24T19:31:22","date_gmt":"2026-11-24T19:31:22","guid":{"rendered":"https:\/\/vectalk.com.br\/blog\/whatsapp-flows-endpoint-encryption\/"},"modified":"2026-11-24T19:31:27","modified_gmt":"2026-11-24T19:31:27","slug":"whatsapp-flows-endpoint-encryption","status":"publish","type":"post","link":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-flows-endpoint-encryption\/","title":{"rendered":"WhatsApp Flows endpoint: data exchange and encryption"},"content":{"rendered":"\n<p><em>Updated on November 24, 2026<\/em><\/p>\n\n\n\n<p>A WhatsApp Flows endpoint is an HTTPS server of your own that the Flow calls while the customer fills it in, to fetch data (open time slots, prices, validating a CPF, the Brazilian taxpayer ID) and decide which screen comes next. Every request arrives encrypted: a 128-bit AES key comes wrapped with your 2048-bit RSA public key, the content is encrypted with AES-GCM, and the response goes back encrypted with the same key and the initialization vector flipped. The endpoint also has to answer Meta&#8217;s health check ping and reply to everything in under 10 seconds.<\/p>\n\n\n\n<p>This guide picks up where the article <a href=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-flows-en\/\">WhatsApp Flows: forms inside the conversation<\/a> leaves off: that one covers the Flow JSON and sending the Flow; here the topic is only the data server, with the key flow, the format of each request, the encryption code in Node.js and what hurts the Flow&#8217;s health.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">When a Flow needs an endpoint<\/h2>\n\n\n\n<p>Meta is straightforward about it: Flows with an endpoint should avoid calling it when it isn&#8217;t needed, because every call adds latency for the customer. According to the <a href=\"https:\/\/developers.facebook.com\/documentation\/business-messaging\/whatsapp\/flows\/guides\/implementingyourflowendpoint\" target=\"_blank\" rel=\"noreferrer noopener\">endpoint implementation documentation<\/a>, your server receives requests in these cases:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Trigger in the Flow<\/th><th>What reaches the endpoint<\/th><th>How to avoid it, if not needed<\/th><\/tr><\/thead><tbody><tr><td>Message sent with <code>flow_action: \"data_exchange\"<\/code><\/td><td><code>action: \"INIT\"<\/code> when the customer opens the Flow<\/td><td>Send the first screen&#8217;s data in <code>flow_action_payload.data<\/code><\/td><\/tr><tr><td><code>on-click-action<\/code> with <code>name: \"data_exchange\"<\/code><\/td><td><code>action: \"data_exchange\"<\/code> with the screen&#8217;s fields<\/td><td>Use <code>navigate<\/code> when the next screen is already known<\/td><\/tr><tr><td>Screen with <code>refresh_on_back: true<\/code><\/td><td><code>action: \"BACK\"<\/code><\/td><td>Omit <code>refresh_on_back<\/code><\/td><\/tr><tr><td>Component with <code>on-select-action<\/code><\/td><td>Data exchange when the value changes<\/td><td>Don&#8217;t define the action<\/td><\/tr><tr><td>Invalid response from you on the previous call<\/td><td>Error notification (<code>data.error<\/code>)<\/td><td>Validate the payload before responding<\/td><\/tr><tr><td>Meta&#8217;s periodic check<\/td><td><code>action: \"ping\"<\/code><\/td><td>Can&#8217;t be avoided: always respond<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Rule of thumb: if the Flow is a fixed form (name, email, reason for contact), it doesn&#8217;t need an endpoint. Scheduling with real availability, quotes that depend on customer records and coupon validation are the typical cases where it does.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Setup, step by step<\/h2>\n\n\n\n<p>Meta splits the setup into four stages:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Create a key pair and upload (sign) the public key.<\/li>\n\n\n<li>Deploy an HTTPS server that accepts <code>POST<\/code>, with a valid TLS certificate. This certificate is not used to encrypt the payload.<\/li>\n\n\n<li>Implement request decryption and response encryption.<\/li>\n\n\n<li>Connect the endpoint to the Flow: set the <code>data_api_version<\/code> in the Flow JSON, configure the endpoint URL and connect a Meta app to the Flow.<\/li>\n\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">1. Generate a 2048-bit RSA key pair<\/h3>\n\n\n\n<p>The Flows <a href=\"https:\/\/developers.facebook.com\/documentation\/business-messaging\/whatsapp\/flows\/guides\/whatsapp-business-encryption\" target=\"_blank\" rel=\"noreferrer noopener\">business encryption guide<\/a> uses OpenSSL:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-bash\">openssl genrsa -des3 -out private.pem 2048\nopenssl rsa -in private.pem -outform PEM -pubout -out public.pem<\/code><\/pre>\n\n\n\n<p>The first command generates the password-protected private key. The second exports the public key. Keep the private key and its passphrase in a secrets vault, never in the repository.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Upload the public key to the phone number<\/h3>\n\n\n\n<p>The key is configured <strong>per phone number<\/strong>: <code>POST \/{PHONE_NUMBER_ID}\/whatsapp_business_encryption<\/code>, with a system user token that has the <code>whatsapp_business_messaging<\/code> permission. Meta signs the key automatically on upload.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-bash\">curl -X POST \"https:\/\/graph.facebook.com\/v27.0\/$PHONE_NUMBER_ID\/whatsapp_business_encryption\" \\\n  -H \"Authorization: Bearer $META_TOKEN\" \\\n  -H \"Content-Type: application\/x-www-form-urlencoded\" \\\n  --data-urlencode \"business_public_key=$(cat public.pem)\"<\/code><\/pre>\n\n\n\n<p>A successful response is <code>{\"success\": true}<\/code>. To check, send a <code>GET<\/code> to the same path: the <code>business_public_key_signature_status<\/code> field returns <code>VALID<\/code> or <code>MISMATCH<\/code>.<\/p>\n\n\n\n<p>Three precautions the documentation points out:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If the account has several phone numbers, upload the key to <strong>each<\/strong> of them.<\/li>\n\n\n<li>Upload the key again when you re-register the number and when <code>public-key-missing<\/code> alerts or key signature verification alerts show up.<\/li>\n\n\n<li>If you serve several businesses, use a dedicated endpoint and key pair for each messaging account.<\/li>\n\n<\/ul>\n\n\n\n<p>If the token is still an issue, the walkthrough is in <a href=\"https:\/\/vectalk.com.br\/blog\/en\/meta-business-system-user-token\/\">system user in Meta Business<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Connect the endpoint to the Flow<\/h3>\n\n\n\n<p>According to the <a href=\"https:\/\/developers.facebook.com\/docs\/whatsapp\/flows\/reference\/flowsapi\" target=\"_blank\" rel=\"noreferrer noopener\">Flows API reference<\/a>, starting with Flow JSON 3.0 the endpoint URL (<code>endpoint_uri<\/code>) is set through the API or the Flow Builder UI, not inside the JSON. The same update call accepts <code>application_id<\/code>, the Meta app connected to the Flow. Every Flow with an endpoint needs a connected app:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-bash\">curl -X POST \"https:\/\/graph.facebook.com\/v27.0\/$FLOW_ID\" \\\n  -H \"Authorization: Bearer $META_TOKEN\" \\\n  -H \"Content-Type: application\/json\" \\\n  -d '{\n    \"endpoint_uri\": \"https:\/\/api.yourcompany.com\/flows\",\n    \"application_id\": \"YOUR_APP_ID\"\n  }'<\/code><\/pre>\n\n\n\n<p>Without <code>endpoint_uri<\/code>, the Flow can&#8217;t be sent or published. If the Flow was created in WhatsApp Manager, the app is connected on the &#8220;Edit Flow&#8221; page.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How the request arrives and how to respond<\/h2>\n\n\n\n<p>Every request body has three base64 fields:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-json\">{\n  \"encrypted_flow_data\": \"&lt;ENCRYPTED_FLOW_DATA&gt;\",\n  \"encrypted_aes_key\": \"&lt;ENCRYPTED_AES_KEY&gt;\",\n  \"initial_vector\": \"&lt;INITIAL_VECTOR&gt;\"\n}<\/code><\/pre>\n\n\n\n<p>For <code>data_api_version<\/code> 3.0, the documentation describes this procedure:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Step<\/th><th>Algorithm<\/th><\/tr><\/thead><tbody><tr><td>Unwrap the AES key<\/td><td>Base64 \u2192 RSA\/ECB\/OAEPWithSHA-256AndMGF1Padding with the private key (SHA-256 for MGF1 too). Result: a 128-bit key<\/td><\/tr><tr><td>Decrypt the payload<\/td><td>Base64 \u2192 AES-GCM with the AES key and the <code>initial_vector<\/code>. The 128-bit tag is at the end of the bytes<\/td><\/tr><tr><td>Build the response<\/td><td>UTF-8 JSON \u2192 AES-GCM with the same key, IV with all bits flipped (XOR 0xFF), empty AAD, 16-byte tag at the end<\/td><\/tr><tr><td>Return it<\/td><td>Everything in base64, in the body, as plain text<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Once decrypted, the data exchange payload looks like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-json\">{\n  \"version\": \"3.0\",\n  \"action\": \"data_exchange\",\n  \"screen\": \"AGENDA\",\n  \"data\": { \"data_escolhida\": \"2026-12-02\" },\n  \"flow_token\": \"ft_7d1c0e9a4b\"\n}<\/code><\/pre>\n\n\n\n<p>You generate the <code>flow_token<\/code> when sending the message, and it works as a session identifier. Meta asks that it not be predictable. For Flows version 7.3 or later with <code>data_api_version<\/code> 4.0 or later, you also receive <code>flow_token_signature<\/code>, an HS256 JWT signed with the app secret, which you can validate to confirm the token hasn&#8217;t been tampered with.<\/p>\n\n\n\n<p>The possible responses:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Situation<\/th><th>Response (before encryption)<\/th><\/tr><\/thead><tbody><tr><td>Go to the next screen<\/td><td><code>{\"screen\": \"HORARIOS\", \"data\": {...}}<\/code><\/td><\/tr><tr><td>Invalid input<\/td><td>Same screen, with <code>data.error_message<\/code>: the customer sees a notice (snackbar)<\/td><\/tr><tr><td>End the Flow<\/td><td><code>{\"screen\": \"SUCCESS\", \"data\": {\"extension_message_response\": {\"params\": {\"flow_token\": \"...\"}}}}<\/code><\/td><\/tr><tr><td>Error notification received<\/td><td><code>{\"data\": {\"acknowledged\": true}}<\/code><\/td><\/tr><tr><td>Health check ping<\/td><td><code>{\"data\": {\"status\": \"active\"}}<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>When you end with <code>SUCCESS<\/code>, the Flow closes and the Flow response message is sent to the conversation, with the <code>params<\/code> values passed on to the messages webhook. Meta recommends following up with a summary message to the customer.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Full example in Node.js<\/h2>\n\n\n\n<p>The code below uses Express and the built-in <code>crypto<\/code> module. It validates the signature, decrypts, routes by <code>action<\/code> and encrypts the response. Meta also maintains a sample Node.js server in the <a href=\"https:\/\/github.com\/WhatsApp\/WhatsApp-Flows-Tools\" target=\"_blank\" rel=\"noreferrer noopener\">WhatsApp-Flows-Tools<\/a> repository.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-js\">import express from \"express\";\nimport crypto from \"node:crypto\";\n\nconst APP_SECRET = process.env.META_APP_SECRET;\nconst PRIVATE_KEY = crypto.createPrivateKey({\n  key: process.env.FLOWS_PRIVATE_KEY,\n  passphrase: process.env.FLOWS_PRIVATE_KEY_PASSPHRASE,\n});\nconst TAG_LENGTH = 16;\n\nconst app = express();\napp.use(express.json({ verify: (req, _res, buf) =&gt; { req.rawBody = buf; } }));\n\nfunction isValidSignature(req) {\n  const received = Buffer.from(req.get(\"x-hub-signature-256\") || \"\");\n  const expected = Buffer.from(\n    \"sha256=\" + crypto.createHmac(\"sha256\", APP_SECRET).update(req.rawBody).digest(\"hex\")\n  );\n  return received.length === expected.length &amp;&amp; crypto.timingSafeEqual(received, expected);\n}\n\nfunction decrypt({ encrypted_aes_key, encrypted_flow_data, initial_vector }) {\n  const aesKey = crypto.privateDecrypt(\n    { key: PRIVATE_KEY, padding: crypto.constants.RSA_PKCS1_OAEP_PADDING, oaepHash: \"sha256\" },\n    Buffer.from(encrypted_aes_key, \"base64\")\n  );\n  const iv = Buffer.from(initial_vector, \"base64\");\n  const data = Buffer.from(encrypted_flow_data, \"base64\");\n  const decipher = crypto.createDecipheriv(\"aes-128-gcm\", aesKey, iv);\n  decipher.setAuthTag(data.subarray(-TAG_LENGTH));\n  const plain = Buffer.concat([decipher.update(data.subarray(0, -TAG_LENGTH)), decipher.final()]);\n  return { payload: JSON.parse(plain.toString(\"utf-8\")), aesKey, iv };\n}\n\nfunction encrypt(response, aesKey, iv) {\n  const flippedIv = Buffer.from(iv.map((byte) =&gt; byte ^ 0xff));\n  const cipher = crypto.createCipheriv(\"aes-128-gcm\", aesKey, flippedIv);\n  return Buffer.concat([\n    cipher.update(JSON.stringify(response), \"utf-8\"),\n    cipher.final(),\n    cipher.getAuthTag(),\n  ]).toString(\"base64\");\n}\n\nasync function availableSlots(date) {\n  \/\/ Query your calendar here. Hardcoded values just for the example.\n  return [\n    { id: `${date}T09:00`, title: \"09:00\" },\n    { id: `${date}T14:30`, title: \"14:30\" },\n  ];\n}\n\nasync function handle(p) {\n  if (p.action === \"ping\") return { data: { status: \"active\" } };\n  if (p.data &amp;&amp; p.data.error) {\n    console.warn(\"Flow reported an error:\", p.data.error, p.data.error_message);\n    return { data: { acknowledged: true } };\n  }\n  if (p.action === \"INIT\") return { screen: \"AGENDA\", data: {} };\n  if (p.action === \"data_exchange\" &amp;&amp; p.screen === \"AGENDA\") {\n    const horarios = await availableSlots(p.data.data_escolhida);\n    if (horarios.length === 0) {\n      return { screen: \"AGENDA\", data: { error_message: \"No times available that day. Please pick another date.\" } };\n    }\n    return { screen: \"HORARIOS\", data: { horarios } };\n  }\n  if (p.action === \"data_exchange\" &amp;&amp; p.screen === \"HORARIOS\") {\n    \/\/ Save the booking before ending the Flow.\n    return {\n      screen: \"SUCCESS\",\n      data: { extension_message_response: { params: { flow_token: p.flow_token, horario: p.data.horario } } },\n    };\n  }\n  return { screen: p.screen || \"AGENDA\", data: { error_message: \"Sorry, we didn't get that. Please try again.\" } };\n}\n\napp.post(\"\/flows\", async (req, res) =&gt; {\n  if (!isValidSignature(req)) return res.sendStatus(432);\n  let ctx;\n  try {\n    ctx = decrypt(req.body);\n  } catch {\n    return res.sendStatus(421);\n  }\n  const response = await handle(ctx.payload);\n  res.type(\"text\/plain\").send(encrypt(response, ctx.aesKey, ctx.iv));\n});\n\napp.listen(3000);<\/code><\/pre>\n\n\n\n<p>Things that often go wrong:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Raw body.<\/strong> The <code>X-Hub-Signature-256<\/code> signature is computed over the exact bytes of the body. If your framework rewrites the JSON first, validation fails. It&#8217;s the same precaution as with the regular webhook, explained in <a href=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-signature-validation\/\">validating the webhook signature<\/a>.<\/li>\n\n\n<li><strong><code>oaepHash<\/code>.<\/strong> Without <code>oaepHash: \"sha256\"<\/code>, Node uses SHA-1 for OAEP and the AES key won&#8217;t unwrap.<\/li>\n\n\n<li><strong>Responding with plain JSON.<\/strong> The Flow expects the base64 string as plain text. Returning <code>res.json(...)<\/code> doesn&#8217;t work.<\/li>\n\n\n<li><strong>Rotating the app secret.<\/strong> To reset it without taking the endpoint down, accept signatures valid with either the old or the new secret for a few hours, then only the new one.<\/li>\n\n<\/ul>\n\n\n\n<p>To test on your machine, the tunneling technique from <a href=\"https:\/\/vectalk.com.br\/blog\/en\/test-whatsapp-webhook-locally\/\">testing the webhook locally<\/a> also works for the Flow endpoint. If you&#8217;d rather go serverless, the same logic fits in a Worker; see <a href=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-cloudflare-workers\/\">webhook with Cloudflare Workers<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Response codes and Flow health<\/h2>\n\n\n\n<p>The <a href=\"https:\/\/developers.facebook.com\/documentation\/business-messaging\/whatsapp\/flows\/reference\/error-codes\" target=\"_blank\" rel=\"noreferrer noopener\">Flows error codes reference<\/a> defines three HTTP statuses for the endpoint:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Status<\/th><th>When to use it<\/th><th>What WhatsApp does<\/th><\/tr><\/thead><tbody><tr><td><code>421<\/code><\/td><td>The payload couldn&#8217;t be decrypted<\/td><td>Downloads the public key again and retries; if that fails, shows a generic error<\/td><\/tr><tr><td><code>427<\/code><\/td><td>The <code>flow_token<\/code> is no longer valid<\/td><td>Disables the Flow button; you can set the message shown<\/td><\/tr><tr><td><code>432<\/code><\/td><td>The request signature doesn&#8217;t match<\/td><td>Shows a generic error<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Beyond that, the request fails with <code>timeout_error<\/code> if the endpoint takes more than 10 seconds, and closing the connection without a response or returning an unexpected status, such as <code>500<\/code>, also counts as an error.<\/p>\n\n\n\n<p>The <a href=\"https:\/\/developers.facebook.com\/docs\/whatsapp\/flows\/guides\/healthmonitoring\" target=\"_blank\" rel=\"noreferrer noopener\">health and monitoring<\/a> guide explains what happens when the metrics get worse. WhatsApp tracks the endpoint&#8217;s error rate, latency and availability, and sends alert webhooks before restricting the Flow:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Status<\/th><th>Effect<\/th><\/tr><\/thead><tbody><tr><td>Published<\/td><td>No restriction<\/td><\/tr><tr><td>Throttled<\/td><td>Only 10 new messages with that Flow per hour; people who already received it can still open it<\/td><\/tr><tr><td>Blocked<\/td><td>The Flow can&#8217;t be sent or opened, including ones already sent<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>To get back to published, Meta advises responding in under 1 second when there&#8217;s a latency alert, keeping the endpoint reachable at all times, answering the ping correctly and fixing the errors listed in the alert. In practice: fetch slow data asynchronously ahead of time (a calendar cache, for example) and run the endpoint on infrastructure that doesn&#8217;t &#8220;sleep&#8221;.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to do it with Vectalk<\/h2>\n\n\n\n<p>Vectalk is a proxy for Meta&#8217;s official WhatsApp Cloud API. Flow management is part of its API, using an instance token: list, create, upload the <code>flow.json<\/code> with <code>POST \/api\/flows\/{flowId}\/assets<\/code>, publish and deprecate, as described in <a href=\"https:\/\/docs.vectalk.com.br\/api-reference\/flows\/create\">Create Flow<\/a> and <a href=\"https:\/\/docs.vectalk.com.br\/api-reference\/flows\/assets\">Flow assets<\/a>. Sending a Flow message uses <code>POST https:\/\/apis.vectalk.com.br\/api\/messages<\/code>, and the <a href=\"https:\/\/docs.vectalk.com.br\/api-reference\/messages\/send\">send message page<\/a> documents <code>flow_action<\/code> with the values <code>navigate<\/code> and <code>data_exchange<\/code>. Fetching a Flow returns the <code>data_api_version<\/code> and <code>endpoint_uri<\/code> fields.<\/p>\n\n\n\n<p>What Vectalk&#8217;s documentation doesn&#8217;t describe today is uploading the public key (<code>whatsapp_business_encryption<\/code>), setting the <code>endpoint_uri<\/code> and connecting the Meta app to the Flow, which is the app whose secret signs the requests. If your project depends on a Flow with an endpoint, confirm that path through the <a href=\"https:\/\/vectalk.com.br\/contato.html\">contact page<\/a> before you start. Flows without an endpoint work with what&#8217;s already documented.<\/p>\n\n\n\n<p>On billing, each delivered message is deducted from your prepaid balance, with no card registered with Meta. To create your account, go to <a href=\"https:\/\/apps.vectalk.com.br\/register\">apps.vectalk.com.br\/register<\/a>. The platform overview is in the <a href=\"https:\/\/vectalk.com.br\/blog\/en\/official-whatsapp-api\/\">official WhatsApp API<\/a> guide.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Frequently asked questions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Can I use the same key pair for several phone numbers?<\/h3>\n\n\n\n<p>The key is uploaded per phone number, so you need to call <code>whatsapp_business_encryption<\/code> for each one. Meta recommends that anyone serving several businesses use a dedicated endpoint and key pair per messaging account.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Is the health check ping encrypted too?<\/h3>\n\n\n\n<p>Yes. Every request to the endpoint arrives in the encrypted format. Once decrypted, the payload contains <code>\"action\": \"ping\"<\/code>, and the <code>{\"data\": {\"status\": \"active\"}}<\/code> response must also be encrypted.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What is the endpoint&#8217;s maximum response time?<\/h3>\n\n\n\n<p>Above 10 seconds the request fails with <code>timeout_error<\/code>. To avoid latency alerts, Meta advises aiming for under 1 second.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What do I do when I get a 421 error in production?<\/h3>\n\n\n\n<p>A 421 makes WhatsApp download the public key again. If the error persists, check with <code>GET \/{PHONE_NUMBER_ID}\/whatsapp_business_encryption<\/code> that the status is <code>VALID<\/code> and upload the key again, especially after re-registering the number.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Do I need an endpoint to receive Flow responses?<\/h3>\n\n\n\n<p>No. The Flow&#8217;s final response arrives on the regular messages webhook. The endpoint is only for exchanging data while the customer fills in the Flow. An example of a serverless lead capture Flow is in <a href=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-lead-form-flows\/\">form inside WhatsApp with Flows<\/a>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Official sources consulted on November 24, 2026:<\/strong> <a href=\"https:\/\/developers.facebook.com\/documentation\/business-messaging\/whatsapp\/flows\/guides\/implementingyourflowendpoint\" target=\"_blank\" rel=\"noreferrer noopener\">Implementing your Flow endpoint<\/a> (updated June 28, 2026); <a href=\"https:\/\/developers.facebook.com\/documentation\/business-messaging\/whatsapp\/flows\/guides\/whatsapp-business-encryption\" target=\"_blank\" rel=\"noreferrer noopener\">WhatsApp Flows business encryption<\/a> (updated July 2, 2026); <a href=\"https:\/\/developers.facebook.com\/docs\/whatsapp\/flows\/guides\/healthmonitoring\" target=\"_blank\" rel=\"noreferrer noopener\">Flow health and monitoring<\/a> (updated June 16, 2026); <a href=\"https:\/\/developers.facebook.com\/docs\/whatsapp\/flows\/reference\/flowsapi\" target=\"_blank\" rel=\"noreferrer noopener\">Flows API<\/a> (updated June 16, 2026); <a href=\"https:\/\/developers.facebook.com\/documentation\/business-messaging\/whatsapp\/flows\/reference\/error-codes\" target=\"_blank\" rel=\"noreferrer noopener\">Flows error codes<\/a>; <a href=\"https:\/\/github.com\/WhatsApp\/WhatsApp-Flows-Tools\" target=\"_blank\" rel=\"noreferrer noopener\">WhatsApp-Flows-Tools on GitHub<\/a>; <a href=\"https:\/\/docs.vectalk.com.br\/api-reference\/flows\/create\">Vectalk documentation: Flows and sending messages<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Step-by-step guide to the WhatsApp Flows data endpoint: generate and upload the public key, decrypt the request, encrypt the response, handle ping and errors. With Node code.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-2201","post","type-post","status-publish","format-standard","hentry","category-blog"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>WhatsApp Flows endpoint: encryption and code | Vectalk<\/title>\n<meta name=\"description\" content=\"How to build a WhatsApp Flows endpoint: 2048-bit RSA key, AES-GCM, health check ping, 421\/427\/432 codes and a full Node.js example.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-flows-endpoint-encryption\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WhatsApp Flows endpoint: encryption and code | Vectalk\" \/>\n<meta property=\"og:description\" content=\"How to build a WhatsApp Flows endpoint: 2048-bit RSA key, AES-GCM, health check ping, 421\/427\/432 codes and a full Node.js example.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-flows-endpoint-encryption\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog Vectalk\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-24T19:31:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-24T19:31:27+00:00\" \/>\n<meta name=\"author\" content=\"wanderleyfcunha\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"wanderleyfcunha\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-flows-endpoint-encryption\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-flows-endpoint-encryption\\\/\"},\"author\":{\"name\":\"wanderleyfcunha\",\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/#\\\/schema\\\/person\\\/ff36ecd9d8257856f227f8e5d639db2b\"},\"headline\":\"WhatsApp Flows endpoint: data exchange and encryption\",\"datePublished\":\"2026-11-24T19:31:22+00:00\",\"dateModified\":\"2026-11-24T19:31:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-flows-endpoint-encryption\\\/\"},\"wordCount\":1678,\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-flows-endpoint-encryption\\\/\",\"url\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-flows-endpoint-encryption\\\/\",\"name\":\"WhatsApp Flows endpoint: encryption and code | Vectalk\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/#website\"},\"datePublished\":\"2026-11-24T19:31:22+00:00\",\"dateModified\":\"2026-11-24T19:31:27+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/#\\\/schema\\\/person\\\/ff36ecd9d8257856f227f8e5d639db2b\"},\"description\":\"How to build a WhatsApp Flows endpoint: 2048-bit RSA key, AES-GCM, health check ping, 421\\\/427\\\/432 codes and a full Node.js example.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-flows-endpoint-encryption\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-flows-endpoint-encryption\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-flows-endpoint-encryption\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WhatsApp Flows endpoint: data exchange and encryption\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/\",\"name\":\"Blog Vectalk\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/#\\\/schema\\\/person\\\/ff36ecd9d8257856f227f8e5d639db2b\",\"name\":\"wanderleyfcunha\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/21c37077f1731eb558973f27a7b647d55f72fde5200a843ac5f5345b247ea725?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/21c37077f1731eb558973f27a7b647d55f72fde5200a843ac5f5345b247ea725?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/21c37077f1731eb558973f27a7b647d55f72fde5200a843ac5f5345b247ea725?s=96&d=mm&r=g\",\"caption\":\"wanderleyfcunha\"},\"sameAs\":[\"https:\\\/\\\/vectalk.com.br\\\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WhatsApp Flows endpoint: encryption and code | Vectalk","description":"How to build a WhatsApp Flows endpoint: 2048-bit RSA key, AES-GCM, health check ping, 421\/427\/432 codes and a full Node.js example.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-flows-endpoint-encryption\/","og_locale":"en_US","og_type":"article","og_title":"WhatsApp Flows endpoint: encryption and code | Vectalk","og_description":"How to build a WhatsApp Flows endpoint: 2048-bit RSA key, AES-GCM, health check ping, 421\/427\/432 codes and a full Node.js example.","og_url":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-flows-endpoint-encryption\/","og_site_name":"Blog Vectalk","article_published_time":"2026-11-24T19:31:22+00:00","article_modified_time":"2026-11-24T19:31:27+00:00","author":"wanderleyfcunha","twitter_card":"summary_large_image","twitter_misc":{"Written by":"wanderleyfcunha","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-flows-endpoint-encryption\/#article","isPartOf":{"@id":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-flows-endpoint-encryption\/"},"author":{"name":"wanderleyfcunha","@id":"https:\/\/vectalk.com.br\/blog\/#\/schema\/person\/ff36ecd9d8257856f227f8e5d639db2b"},"headline":"WhatsApp Flows endpoint: data exchange and encryption","datePublished":"2026-11-24T19:31:22+00:00","dateModified":"2026-11-24T19:31:27+00:00","mainEntityOfPage":{"@id":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-flows-endpoint-encryption\/"},"wordCount":1678,"articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-flows-endpoint-encryption\/","url":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-flows-endpoint-encryption\/","name":"WhatsApp Flows endpoint: encryption and code | Vectalk","isPartOf":{"@id":"https:\/\/vectalk.com.br\/blog\/#website"},"datePublished":"2026-11-24T19:31:22+00:00","dateModified":"2026-11-24T19:31:27+00:00","author":{"@id":"https:\/\/vectalk.com.br\/blog\/#\/schema\/person\/ff36ecd9d8257856f227f8e5d639db2b"},"description":"How to build a WhatsApp Flows endpoint: 2048-bit RSA key, AES-GCM, health check ping, 421\/427\/432 codes and a full Node.js example.","breadcrumb":{"@id":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-flows-endpoint-encryption\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vectalk.com.br\/blog\/en\/whatsapp-flows-endpoint-encryption\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-flows-endpoint-encryption\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vectalk.com.br\/blog\/"},{"@type":"ListItem","position":2,"name":"WhatsApp Flows endpoint: data exchange and encryption"}]},{"@type":"WebSite","@id":"https:\/\/vectalk.com.br\/blog\/#website","url":"https:\/\/vectalk.com.br\/blog\/","name":"Blog Vectalk","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vectalk.com.br\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/vectalk.com.br\/blog\/#\/schema\/person\/ff36ecd9d8257856f227f8e5d639db2b","name":"wanderleyfcunha","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/21c37077f1731eb558973f27a7b647d55f72fde5200a843ac5f5345b247ea725?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/21c37077f1731eb558973f27a7b647d55f72fde5200a843ac5f5345b247ea725?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/21c37077f1731eb558973f27a7b647d55f72fde5200a843ac5f5345b247ea725?s=96&d=mm&r=g","caption":"wanderleyfcunha"},"sameAs":["https:\/\/vectalk.com.br\/blog"]}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/posts\/2201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/comments?post=2201"}],"version-history":[{"count":1,"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/posts\/2201\/revisions"}],"predecessor-version":[{"id":2204,"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/posts\/2201\/revisions\/2204"}],"wp:attachment":[{"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/media?parent=2201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/categories?post=2201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/tags?post=2201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}