{"id":1357,"date":"2026-11-04T16:15:06","date_gmt":"2026-11-04T16:15:06","guid":{"rendered":"https:\/\/vectalk.com.br\/blog\/whatsapp-webhook-supabase\/"},"modified":"2026-11-04T16:15:11","modified_gmt":"2026-11-04T16:15:11","slug":"whatsapp-webhook-supabase","status":"publish","type":"post","link":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-supabase\/","title":{"rendered":"WhatsApp Webhook with Supabase: Edge Function and Database Ready to Go"},"content":{"rendered":"\n<p><em>Updated on November 4, 2026<\/em><\/p>\n\n\n\n<p>You can run the whole WhatsApp Business API webhook on Supabase: an Edge Function (Deno) answers Meta&#8217;s verification request, validates the <code>X-Hub-Signature-256<\/code> signature, stores messages and statuses in Postgres and replies to the customer through the API. The one mandatory tweak is turning off JWT verification for that function, because Meta does not send a Supabase token.<\/p>\n\n\n\n<p>This guide gives you the table SQL, the full function code, the deploy commands and the Supabase limits worth watching.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Supabase for a WhatsApp webhook<\/h2>\n\n\n\n<p>A WhatsApp webhook needs three things: a public HTTPS URL, a fast HTTP 200 response and somewhere to store what arrives. Supabase gives you all three in one project. The Edge Function is the URL, Postgres stores messages and statuses, and the Supabase dashboard already lets you browse the data without another tool.<\/p>\n\n\n\n<p>It is the same reasoning as a <a href=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-aws-lambda-serverless\/\">serverless webhook on Cloudflare Workers, Lambda or Vercel<\/a>, with the bonus that the database sits right next to the function. If you are new to the event format, start with the <a href=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-api-webhooks\/\">WhatsApp API webhooks guide<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What you need first<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A Supabase project and the <a href=\"https:\/\/supabase.com\/docs\/guides\/functions\/deploy\" target=\"_blank\" rel=\"noreferrer noopener\">CLI<\/a> logged in (<code>supabase login<\/code> and <code>supabase link --project-ref YOUR_PROJECT<\/code>).<\/li>\n\n\n<li>A number on the <a href=\"https:\/\/vectalk.com.br\/blog\/en\/official-whatsapp-api\/\">official WhatsApp API<\/a> and its <code>phone_number_id<\/code>.<\/li>\n\n\n<li>Your Meta app&#8217;s <strong>app secret<\/strong> (to validate the signature) and a <strong>verify token<\/strong>, any string you make up.<\/li>\n\n\n<li>A token to send messages: the Meta access token or, if you use Vectalk, an instance token.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: create the tables<\/h2>\n\n\n\n<p>Two tables cover most cases: one for messages (inbound and outbound) and one for delivery statuses. The <code>wamid<\/code>, the ID Meta assigns to each message, is a unique key, which makes writes idempotent: if Meta resends the same event, the database ignores it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-sql\">create table public.wa_messages (\n  id bigint generated always as identity primary key,\n  wamid text unique not null,\n  phone_number_id text not null,\n  contact_wa_id text not null,\n  contact_name text,\n  direction text not null check (direction in ('in', 'out')),\n  type text not null,\n  body text,\n  raw jsonb not null,\n  sent_at timestamptz not null default now()\n);\n\ncreate table public.wa_statuses (\n  id bigint generated always as identity primary key,\n  wamid text not null,\n  status text not null,\n  recipient_wa_id text,\n  errors jsonb,\n  raw jsonb not null,\n  status_at timestamptz not null,\n  unique (wamid, status)\n);\n\ncreate index on public.wa_messages (contact_wa_id, sent_at desc);\n\nalter table public.wa_messages enable row level security;\nalter table public.wa_statuses enable row level security;<\/code><\/pre>\n\n\n\n<p>With RLS on and no policies, only the secret key (used by the function) can read and write. If your front end will query these tables, add specific policies for signed-in users. To go further (export, retention, deletion), see <a href=\"https:\/\/vectalk.com.br\/blog\/en\/save-whatsapp-api-chat-history\/\">how to save WhatsApp conversation history<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: create the function and turn off JWT<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-bash\">supabase functions new whatsapp-webhook<\/code><\/pre>\n\n\n\n<p>By default, every Edge Function requires a valid Supabase JWT in the <code>Authorization<\/code> header. Meta does not send one, so the call would die with a 401. The <a href=\"https:\/\/supabase.com\/docs\/guides\/functions\/function-configuration\" target=\"_blank\" rel=\"noreferrer noopener\">function configuration docs<\/a> show how to disable the check for this function only, in <code>supabase\/config.toml<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-toml\">[functions.whatsapp-webhook]\nverify_jwt = false<\/code><\/pre>\n\n\n\n<p>Supabase itself warns that this lets anyone invoke the function. That is why the signature check in step 3 is not optional: it replaces the JWT as proof that the event came from Meta.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: the Edge Function code<\/h2>\n\n\n\n<p>The function does four things: answers the verification <code>GET<\/code>, validates the <code>POST<\/code> signature over the raw body, returns 200 and processes the event in the background with <code>EdgeRuntime.waitUntil<\/code>, described in <a href=\"https:\/\/supabase.com\/docs\/guides\/functions\/background-tasks\" target=\"_blank\" rel=\"noreferrer noopener\">background tasks<\/a>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-ts\">\/\/ supabase\/functions\/whatsapp-webhook\/index.ts\nimport { createClient } from \"npm:@supabase\/supabase-js@2\";\n\nconst VERIFY_TOKEN = Deno.env.get(\"WA_VERIFY_TOKEN\")!;\nconst APP_SECRET = Deno.env.get(\"META_APP_SECRET\")!;\nconst SEND_URL = Deno.env.get(\"WA_SEND_URL\")!; \/\/ Meta or Vectalk\nconst SEND_TOKEN = Deno.env.get(\"WA_SEND_TOKEN\")!;\n\nconst secretKeys = JSON.parse(Deno.env.get(\"SUPABASE_SECRET_KEYS\") ?? \"{}\");\nconst db = createClient(\n  Deno.env.get(\"SUPABASE_URL\")!,\n  secretKeys[\"default\"] ?? Deno.env.get(\"SUPABASE_SERVICE_ROLE_KEY\")!,\n);\n\nasync function validSignature(raw: string, header: string | null) {\n  if (!header?.startsWith(\"sha256=\")) return false;\n  const key = await crypto.subtle.importKey(\n    \"raw\", new TextEncoder().encode(APP_SECRET),\n    { name: \"HMAC\", hash: \"SHA-256\" }, false, [\"sign\"],\n  );\n  const sig = await crypto.subtle.sign(\"HMAC\", key, new TextEncoder().encode(raw));\n  const hex = [...new Uint8Array(sig)].map((b) =&gt; b.toString(16).padStart(2, \"0\")).join(\"\");\n  const got = header.slice(7);\n  if (got.length !== hex.length) return false;\n  let diff = 0;\n  for (let i = 0; i &lt; hex.length; i++) diff |= hex.charCodeAt(i) ^ got.charCodeAt(i);\n  return diff === 0;\n}\n\nasync function reply(phoneNumberId: string, to: string, text: string) {\n  const res = await fetch(SEND_URL.replace(\"{PHONE_NUMBER_ID}\", phoneNumberId), {\n    method: \"POST\",\n    headers: { Authorization: `Bearer ${SEND_TOKEN}`, \"Content-Type\": \"application\/json\" },\n    body: JSON.stringify({ messaging_product: \"whatsapp\", to, type: \"text\", text: { body: text } }),\n  });\n  const data = await res.json();\n  const wamid = data?.messages?.[0]?.id;\n  if (wamid) {\n    await db.from(\"wa_messages\").insert({\n      wamid, phone_number_id: phoneNumberId, contact_wa_id: to,\n      direction: \"out\", type: \"text\", body: text, raw: data,\n    });\n  }\n}\n\nasync function process(payload: any) {\n  for (const entry of payload.entry ?? []) {\n    for (const change of entry.changes ?? []) {\n      if (change.field !== \"messages\") continue;\n      const v = change.value;\n      const phoneNumberId = v.metadata?.phone_number_id;\n      const names = Object.fromEntries((v.contacts ?? []).map((c: any) =&gt; [c.wa_id, c.profile?.name]));\n\n      for (const m of v.messages ?? []) {\n        const { data: novas, error } = await db.from(\"wa_messages\").upsert({\n          wamid: m.id, phone_number_id: phoneNumberId, contact_wa_id: m.from,\n          contact_name: names[m.from] ?? null, direction: \"in\", type: m.type,\n          body: m.text?.body ?? m.interactive?.button_reply?.title ?? null,\n          raw: m, sent_at: new Date(Number(m.timestamp) * 1000).toISOString(),\n        }, { onConflict: \"wamid\", ignoreDuplicates: true }).select(\"id\");\n        if (error) console.error(error);\n        \/\/ reply only if the row is new (a Meta retry does not trigger a second reply)\n        if (m.type === \"text\" &amp;&amp; novas?.length) {\n          await reply(phoneNumberId, m.from, \"We got your message. We'll reply shortly!\");\n        }\n      }\n\n      for (const s of v.statuses ?? []) {\n        await db.from(\"wa_statuses\").upsert({\n          wamid: s.id, status: s.status, recipient_wa_id: s.recipient_id,\n          errors: s.errors ?? null, raw: s,\n          status_at: new Date(Number(s.timestamp) * 1000).toISOString(),\n        }, { onConflict: \"wamid,status\", ignoreDuplicates: true });\n      }\n    }\n  }\n}\n\nDeno.serve(async (req) =&gt; {\n  const url = new URL(req.url);\n\n  if (req.method === \"GET\") {\n    const ok = url.searchParams.get(\"hub.mode\") === \"subscribe\" &amp;&amp;\n      url.searchParams.get(\"hub.verify_token\") === VERIFY_TOKEN;\n    return ok\n      ? new Response(url.searchParams.get(\"hub.challenge\"), { status: 200 })\n      : new Response(\"forbidden\", { status: 403 });\n  }\n\n  if (req.method !== \"POST\") return new Response(\"method not allowed\", { status: 405 });\n\n  const raw = await req.text(); \/\/ raw body: the signature is computed over it\n  if (!(await validSignature(raw, req.headers.get(\"x-hub-signature-256\")))) {\n    return new Response(\"invalid signature\", { status: 401 });\n  }\n\n  EdgeRuntime.waitUntil(process(JSON.parse(raw)).catch(console.error));\n  return new Response(\"ok\", { status: 200 });\n});<\/code><\/pre>\n\n\n\n<p>Common pitfalls:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Raw body.<\/strong> The signature is an HMAC-SHA256 of the payload using the app secret, per the <a href=\"https:\/\/developers.facebook.com\/documentation\/business-messaging\/whatsapp\/webhooks\/create-webhook-endpoint\" target=\"_blank\" rel=\"noreferrer noopener\">webhook endpoint docs<\/a>. Read it with <code>req.text()<\/code> and only then <code>JSON.parse<\/code>; re-serializing the JSON changes the bytes and the signature won&#8217;t match. Other languages are covered in <a href=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-signature-validation\/\">how to validate the webhook signature<\/a>.<\/li>\n\n\n<li><strong>Database key.<\/strong> The function uses the secret key Supabase injects. According to the <a href=\"https:\/\/supabase.com\/docs\/guides\/functions\/secrets\" target=\"_blank\" rel=\"noreferrer noopener\">secrets page<\/a>, <code>SUPABASE_URL<\/code> and <code>SUPABASE_SECRET_KEYS<\/code> (a JSON object with a <code>default<\/code> key) are already in the environment; <code>SUPABASE_SERVICE_ROLE_KEY<\/code> is still available as a legacy key.<\/li>\n\n\n<li><strong>Auto-reply to every text.<\/strong> The example replies to any inbound text just to show the flow. In production, swap in your own rule (business hours, first message of the day, hand-off to a bot).<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: secrets and deploy<\/h2>\n\n\n\n<p>Custom secret names cannot start with <code>SUPABASE_<\/code>, which is reserved. Set yours and deploy:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-bash\">supabase secrets set WA_VERIFY_TOKEN=a-string-you-made-up\nsupabase secrets set META_APP_SECRET=your_app_secret\nsupabase secrets set WA_SEND_TOKEN=your_token\nsupabase secrets set WA_SEND_URL=\"https:\/\/graph.facebook.com\/vXX.X\/{PHONE_NUMBER_ID}\/messages\"\nsupabase functions deploy whatsapp-webhook<\/code><\/pre>\n\n\n\n<p>Replace <code>vXX.X<\/code> with the Graph API version your app uses. The function&#8217;s public URL looks like <code>https:\/\/YOUR_PROJECT.supabase.co\/functions\/v1\/whatsapp-webhook<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: plug the URL into Meta<\/h2>\n\n\n\n<p>In your app dashboard, under <strong>WhatsApp &gt; Configuration<\/strong>, paste the function URL as the callback URL along with the same verify token. Meta sends a <code>GET<\/code> with <code>hub.mode<\/code>, <code>hub.verify_token<\/code> and <code>hub.challenge<\/code>; the function returns <code>hub.challenge<\/code> with a 200 and verification passes. Then subscribe to the <code>messages<\/code> field. Send a message to the number and check for new rows in <code>wa_messages<\/code>.<\/p>\n\n\n\n<p>If nothing shows up, check the function logs in the Supabase dashboard and follow the <a href=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-not-working\/\">webhook-not-working checklist<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Supabase limits that matter for a webhook<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Limit<\/th><th>Value<\/th><th>What it means here<\/th><\/tr><\/thead><tbody><tr><td>Wall clock time<\/td><td>150 s on Free, 400 s on paid plans<\/td><td>Also caps the <code>waitUntil<\/code> task<\/td><\/tr><tr><td>CPU time per request<\/td><td>2 s<\/td><td>Async I\/O (database, fetch) doesn&#8217;t count; HMAC and JSON are cheap<\/td><\/tr><tr><td>Memory<\/td><td>256 MB<\/td><td>Don&#8217;t download large media inside the function<\/td><\/tr><tr><td>Request idle timeout<\/td><td>150 s<\/td><td>Irrelevant if you return 200 before processing<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Values from the <a href=\"https:\/\/supabase.com\/docs\/guides\/functions\/limits\" target=\"_blank\" rel=\"noreferrer noopener\">limits page<\/a>. Meta retries unacknowledged events for up to 7 days and may batch up to 1,000 updates in a single POST. That is why the <code>upsert<\/code> uses <code>ignoreDuplicates<\/code> and <code>.select()<\/code>: a retry doesn&#8217;t create a duplicate row, and the auto-reply only fires when the row was just inserted.<\/p>\n\n\n\n<p>When volume grows or processing gets heavy (AI, transcription, CRM), replace <code>waitUntil<\/code> with a queue: store the payload in a table and process it with a worker. The full design is in <a href=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-api-integration-architecture\/\">integration architecture with queues, retries and idempotency<\/a>.<\/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 the official API: according to the <a href=\"https:\/\/docs.vectalk.com.br\/concepts\/webhooks.md\">Vectalk webhook docs<\/a>, the Hub forwards the same payload it receives from Meta to your registered URLs, so the tables and <code>process()<\/code> above work unchanged. Register the function URL with <code>POST https:\/\/apis.vectalk.com.br\/api\/webhooks<\/code> (fields <code>instance_id<\/code>, <code>url<\/code> and <code>name<\/code>) and return 200 within 20 seconds. To send, set <code>WA_SEND_URL=https:\/\/apis.vectalk.com.br\/api\/messages<\/code> and use an instance token as <code>WA_SEND_TOKEN<\/code>; the token resolves the <code>phone_number_id<\/code>.<\/p>\n\n\n\n<p>Vectalk&#8217;s docs don&#8217;t describe a signature header on forwarded events. In that case, replace the <code>X-Hub-Signature-256<\/code> check with your own secret in the registered URL (for example, <code>?key=...<\/code> compared against a function secret) and confirm with <a href=\"https:\/\/vectalk.com.br\/contato.html\">support<\/a> what the Hub sends. To get started, <a href=\"https:\/\/apps.vectalk.com.br\/register\">create your account<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Frequently asked questions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Why does my Edge Function return 401 to Meta?<\/h3>\n\n\n\n<p>It&#8217;s almost always the JWT. Without <code>verify_jwt = false<\/code> in <code>config.toml<\/code>, Supabase requires a token in the <code>Authorization<\/code> header and blocks the call before your code runs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Can I use the anon key instead of the secret key?<\/h3>\n\n\n\n<p>With RLS on and no policies, the anon key can&#8217;t write anything. The secret key stays server-side (inside the function) and must never reach the front end.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Can the Edge Function receive media?<\/h3>\n\n\n\n<p>Yes, but the webhook only carries the media ID. You have to download it afterwards with your token and store it in Supabase Storage, ideally outside the webhook&#8217;s critical path. See <a href=\"https:\/\/vectalk.com.br\/blog\/en\/download-media-whatsapp-webhook\/\">how to download media customers send<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Can one function serve several numbers?<\/h3>\n\n\n\n<p>Yes. Each event&#8217;s <code>metadata.phone_number_id<\/code> tells you which number received the message, and the <code>phone_number_id<\/code> column stores it. For multiple customers, see <a href=\"https:\/\/vectalk.com.br\/blog\/en\/multi-tenant-whatsapp-api-saas\/\">multi-tenant SaaS on the WhatsApp API<\/a>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Official sources checked on November 4, 2026:<\/strong> <a href=\"https:\/\/developers.facebook.com\/documentation\/business-messaging\/whatsapp\/webhooks\/create-webhook-endpoint\" target=\"_blank\" rel=\"noreferrer noopener\">Meta: create a webhook endpoint<\/a>, <a href=\"https:\/\/developers.facebook.com\/documentation\/business-messaging\/whatsapp\/webhooks\/overview\" target=\"_blank\" rel=\"noreferrer noopener\">Meta: webhooks overview<\/a>, <a href=\"https:\/\/supabase.com\/docs\/guides\/functions\/function-configuration\" target=\"_blank\" rel=\"noreferrer noopener\">Supabase: function configuration<\/a>, <a href=\"https:\/\/supabase.com\/docs\/guides\/functions\/secrets\" target=\"_blank\" rel=\"noreferrer noopener\">Supabase: secrets<\/a>, <a href=\"https:\/\/supabase.com\/docs\/guides\/functions\/background-tasks\" target=\"_blank\" rel=\"noreferrer noopener\">Supabase: background tasks<\/a>, <a href=\"https:\/\/supabase.com\/docs\/guides\/functions\/deploy\" target=\"_blank\" rel=\"noreferrer noopener\">Supabase: deploy<\/a>, <a href=\"https:\/\/supabase.com\/docs\/guides\/functions\/limits\" target=\"_blank\" rel=\"noreferrer noopener\">Supabase: limits<\/a>, <a href=\"https:\/\/docs.vectalk.com.br\/concepts\/webhooks.md\">Vectalk: webhooks<\/a>, <a href=\"https:\/\/docs.vectalk.com.br\/authentication.md\">Vectalk: authentication<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A Supabase Edge Function that receives the WhatsApp Business API webhook, validates the signature, stores messages and statuses in tables and sends a reply.<\/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-1357","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 Webhook with Supabase Edge Functions | Vectalk<\/title>\n<meta name=\"description\" content=\"WhatsApp webhook on Supabase: a Deno Edge Function that verifies Meta, validates the signature, stores messages and statuses in Postgres and replies.\" \/>\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-webhook-supabase\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WhatsApp Webhook with Supabase Edge Functions | Vectalk\" \/>\n<meta property=\"og:description\" content=\"WhatsApp webhook on Supabase: a Deno Edge Function that verifies Meta, validates the signature, stores messages and statuses in Postgres and replies.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-supabase\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog Vectalk\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-04T16:15:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-04T16:15:11+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=\"10 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-webhook-supabase\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-webhook-supabase\\\/\"},\"author\":{\"name\":\"wanderleyfcunha\",\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/#\\\/schema\\\/person\\\/ff36ecd9d8257856f227f8e5d639db2b\"},\"headline\":\"WhatsApp Webhook with Supabase: Edge Function and Database Ready to Go\",\"datePublished\":\"2026-11-04T16:15:06+00:00\",\"dateModified\":\"2026-11-04T16:15:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-webhook-supabase\\\/\"},\"wordCount\":1121,\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-webhook-supabase\\\/\",\"url\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-webhook-supabase\\\/\",\"name\":\"WhatsApp Webhook with Supabase Edge Functions | Vectalk\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/#website\"},\"datePublished\":\"2026-11-04T16:15:06+00:00\",\"dateModified\":\"2026-11-04T16:15:11+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/#\\\/schema\\\/person\\\/ff36ecd9d8257856f227f8e5d639db2b\"},\"description\":\"WhatsApp webhook on Supabase: a Deno Edge Function that verifies Meta, validates the signature, stores messages and statuses in Postgres and replies.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-webhook-supabase\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-webhook-supabase\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-webhook-supabase\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WhatsApp Webhook with Supabase: Edge Function and Database Ready to Go\"}]},{\"@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 Webhook with Supabase Edge Functions | Vectalk","description":"WhatsApp webhook on Supabase: a Deno Edge Function that verifies Meta, validates the signature, stores messages and statuses in Postgres and replies.","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-webhook-supabase\/","og_locale":"en_US","og_type":"article","og_title":"WhatsApp Webhook with Supabase Edge Functions | Vectalk","og_description":"WhatsApp webhook on Supabase: a Deno Edge Function that verifies Meta, validates the signature, stores messages and statuses in Postgres and replies.","og_url":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-supabase\/","og_site_name":"Blog Vectalk","article_published_time":"2026-11-04T16:15:06+00:00","article_modified_time":"2026-11-04T16:15:11+00:00","author":"wanderleyfcunha","twitter_card":"summary_large_image","twitter_misc":{"Written by":"wanderleyfcunha","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-supabase\/#article","isPartOf":{"@id":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-supabase\/"},"author":{"name":"wanderleyfcunha","@id":"https:\/\/vectalk.com.br\/blog\/#\/schema\/person\/ff36ecd9d8257856f227f8e5d639db2b"},"headline":"WhatsApp Webhook with Supabase: Edge Function and Database Ready to Go","datePublished":"2026-11-04T16:15:06+00:00","dateModified":"2026-11-04T16:15:11+00:00","mainEntityOfPage":{"@id":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-supabase\/"},"wordCount":1121,"articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-supabase\/","url":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-supabase\/","name":"WhatsApp Webhook with Supabase Edge Functions | Vectalk","isPartOf":{"@id":"https:\/\/vectalk.com.br\/blog\/#website"},"datePublished":"2026-11-04T16:15:06+00:00","dateModified":"2026-11-04T16:15:11+00:00","author":{"@id":"https:\/\/vectalk.com.br\/blog\/#\/schema\/person\/ff36ecd9d8257856f227f8e5d639db2b"},"description":"WhatsApp webhook on Supabase: a Deno Edge Function that verifies Meta, validates the signature, stores messages and statuses in Postgres and replies.","breadcrumb":{"@id":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-supabase\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-supabase\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-supabase\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vectalk.com.br\/blog\/"},{"@type":"ListItem","position":2,"name":"WhatsApp Webhook with Supabase: Edge Function and Database Ready to Go"}]},{"@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\/1357","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=1357"}],"version-history":[{"count":1,"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/posts\/1357\/revisions"}],"predecessor-version":[{"id":1360,"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/posts\/1357\/revisions\/1360"}],"wp:attachment":[{"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/media?parent=1357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/categories?post=1357"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/tags?post=1357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}