Supabase Edge Functions Webhook Receiver

One Supabase Edge Function for a Dualhook connection: Meta's GET verification, payload validation with Coexistence fields, work after the response, Postgres dedupe, and template sends.

This guide builds one Supabase Edge Function that receives WhatsApp webhooks on a Dualhook connection. The function was tested on 30 November 2026 by running it locally under Deno 2.9.6 with @supabase/server 1.9.2, with local stand-ins for EdgeRuntime.waitUntil, the database API and the Runtime API. It was not deployed to a Supabase project.

The guide applies to any Supabase project, including one you connected to Lovable: Lovable deploys edge functions to your own Supabase project and stores their secrets there. On Lovable's built-in backend, Lovable writes and deploys edge functions from the project chat, so the CLI and Dashboard steps on this page do not apply there.

Prerequisites

  • A Supabase project, and either the Supabase CLI or access to the project's Dashboard
  • The project's default publishable and secret API keys, under Settings > API Keys. An older project with only the legacy anon and service_role keys shows a Create new API keys button there; creating them leaves the legacy keys working
  • A Dualhook connection in progress or active. Dualhook asks for your webhook URL and verify token before Meta's signup opens, so deploy the function first
  • A verify token you choose, at least 16 characters, used only for the GET handshake
  • A per-connection Dualhook dh_live_... key and your PHONE_NUMBER_ID for outbound runtime sends
  • Your WABA_ID for payload-side validation

No META_APP_SECRET? In the Embedded Signup flow X-Hub-Signature-256 is signed by Dualhook's Meta app and isn't customer-verifiable: validate inbound webhook payload shape instead. These checks do not prove the sender is Meta, so treat the URL as a secret. See Messaging Webhook → Inbound Webhook POST Validation.

Architecture Overview

With Dualhook, Meta sends message-path webhooks directly to your function URL. Dualhook stays out of the message content path and focuses on setup, monitoring, and management events.

Meta (messages, statuses, errors; Coexistence echoes, history, contacts)
  → https://<project-ref>.supabase.co/functions/v1/whatsapp-webhook/<secret>
     → verification, inbound payload validation, 200
     → dedupe and your logic in a background task
     → optional send through api.dualhook.com

Dualhook
  → management events to the same URL, health visibility, template operations

The function becomes part of your message-processing boundary. Supabase does not log request or response bodies, but anything your code prints with console.log or stores in a table stays in your project, even though Dualhook itself does not store it. See Compliance & Data Retention and Architecture & Security for the privacy split.

Create the Function

With the Supabase CLI, in your project folder (run supabase init first if it has no supabase folder):

supabase functions new whatsapp-webhook

This creates supabase/functions/whatsapp-webhook/index.ts. Replace its contents with the function code, add the setting from Turn Off JWT Verification, then link the project and deploy:

supabase login
supabase link --project-ref <project-ref>
supabase functions deploy whatsapp-webhook

supabase functions deploy and supabase secrets set ask for confirmation. In a script or from a coding agent, add --yes. Deploying does not need Docker, because the CLI falls back to API-based deployment. Serving the function locally with supabase functions serve does need Docker.

Create the dedupe table at the same time, before you connect the number.

Without the CLI, open Edge Functions in the Supabase Dashboard, click Deploy a new function, choose Via Editor, paste the code and click Deploy function. The function's name is part of its URL, so name it whatsapp-webhook. The Dashboard editor has no version control, so keep a copy of the code.

The function answers at https://<project-ref>.supabase.co/functions/v1/whatsapp-webhook, and Supabase routes paths below the function name to the same function. The webhook URL you give Dualhook is that address plus one secret segment (see Keep the URL unguessable):

https://<project-ref>.supabase.co/functions/v1/whatsapp-webhook/<WEBHOOK_PATH_SECRET>

The Function Code

One file, supabase/functions/whatsapp-webhook/index.ts. The sections after it explain each part.

// supabase/functions/whatsapp-webhook/index.ts
import { type SupabaseContext, withSupabase } from 'npm:@supabase/server@1'

// Provided by the Supabase Edge Runtime. Keeps the worker alive after the response.
declare const EdgeRuntime: { waitUntil(promise: Promise<unknown>): void }

type Db = SupabaseContext['supabaseAdmin']
// deno-lint-ignore no-explicit-any
type Json = Record<string, any>

// Fields Meta sends straight to this URL. All four carry value.metadata.phone_number_id.
const MESSAGE_PATH_FIELDS = new Set([
  'messages',
  'smb_message_echoes',
  'history',
  'smb_app_state_sync',
])

export default {
  fetch: withSupabase({ auth: 'none', cors: 'disabled' }, async (req, ctx) => {
    const url = new URL(req.url)

    // The last path segment is the secret part of the URL.
    const pathSecret = Deno.env.get('WEBHOOK_PATH_SECRET')
    if (!pathSecret) return notConfigured('WEBHOOK_PATH_SECRET')
    if (url.pathname.split('/').pop() !== pathSecret) {
      return new Response('Not found', { status: 404 })
    }

    // Meta's verification handshake.
    if (req.method === 'GET') {
      const verifyToken = Deno.env.get('WHATSAPP_VERIFY_TOKEN')
      if (!verifyToken) return notConfigured('WHATSAPP_VERIFY_TOKEN')
      const query = url.searchParams
      if (query.get('hub.mode') === 'subscribe' && query.get('hub.verify_token') === verifyToken) {
        return new Response(query.get('hub.challenge') ?? '', {
          status: 200,
          headers: { 'Content-Type': 'text/plain' },
        })
      }
      return new Response('Forbidden', { status: 403 })
    }

    if (req.method !== 'POST') {
      return new Response('Method not allowed', { status: 405, headers: { Allow: 'GET, POST' } })
    }

    // Until both IDs are set, answer 503 so Meta delivers again later.
    const wabaId = Deno.env.get('WHATSAPP_WABA_ID')
    const phoneNumberId = Deno.env.get('WHATSAPP_PHONE_NUMBER_ID')
    if (!wabaId || !phoneNumberId) {
      return notConfigured('WHATSAPP_WABA_ID', 'WHATSAPP_PHONE_NUMBER_ID')
    }

    const payload: Json | null = await req.json().catch(() => null)
    if (!isExpectedPayload(payload, wabaId, phoneNumberId)) {
      return new Response('Unauthorized', { status: 401 })
    }

    // The sample event from Dualhook's Test endpoint carries no message.
    if (req.headers.get('X-Dualhook-Event') === 'test_ping') {
      console.log('Dualhook Test endpoint ping')
      return new Response('OK', { status: 200 })
    }

    // Answer now, work after the response.
    EdgeRuntime.waitUntil(
      processPayload(payload, ctx.supabaseAdmin).catch((error) => {
        console.error('webhook processing failed', error)
      }),
    )
    return new Response('OK', { status: 200 })
  }),
}

function notConfigured(...names: string[]): Response {
  const missing = names.filter((name) => !Deno.env.get(name))
  console.error('Not configured. Missing secrets:', missing.join(', '))
  return new Response('Not configured', { status: 503 })
}

// Envelope, WABA ID, then the phone number ID on the fields that carry one.
function isExpectedPayload(
  payload: Json | null,
  wabaId: string,
  phoneNumberId: string,
): payload is Json {
  if (payload?.object !== 'whatsapp_business_account') return false
  if (!Array.isArray(payload.entry) || payload.entry.length === 0) return false

  for (const entry of payload.entry) {
    if (entry?.id !== wabaId) return false
    if (!Array.isArray(entry.changes) || entry.changes.length === 0) return false

    for (const change of entry.changes) {
      if (typeof change?.field !== 'string') return false
      // Management events forwarded by Dualhook have no metadata.phone_number_id.
      if (
        MESSAGE_PATH_FIELDS.has(change.field) &&
        change.value?.metadata?.phone_number_id !== phoneNumberId
      ) {
        return false
      }
    }
  }
  return true
}

async function processPayload(payload: Json, db: Db): Promise<void> {
  for (const entry of payload.entry) {
    for (const change of entry.changes) {
      const value: Json = change.value ?? {}

      switch (change.field) {
        case 'messages':
          for (const message of value.messages ?? []) {
            if (await isFirstDelivery(db, `message:${message.id}`)) await onCustomerMessage(message)
          }
          for (const status of value.statuses ?? []) {
            if (await isFirstDelivery(db, `status:${status.id}:${status.status}`)) onStatus(status)
          }
          for (const error of value.errors ?? []) console.error('whatsapp error', error.code)
          break

        case 'smb_message_echoes': // Coexistence: staff replied from the WhatsApp Business app
          for (const echo of value.message_echoes ?? []) {
            if (await isFirstDelivery(db, `echo:${echo.id}`)) onStaffReply(echo)
          }
          break

        case 'history': // Coexistence: one-time chat history sync, in chunks
          for (const chunk of value.history ?? []) {
            console.log('history chunk', chunk.metadata ?? chunk.errors?.map((e: Json) => e.code))
          }
          break

        case 'smb_app_state_sync': // Coexistence: contacts from the WhatsApp Business app
          console.log('contact sync', (value.state_sync ?? []).length)
          break

        default: // management event forwarded by Dualhook, for example a template status
          console.log('management event', change.field, value.event ?? '')
      }
    }
  }
}

// Insert the key. A unique violation means this event was handled before.
// Any other failure is logged and the event is processed: a duplicate is better than a lost message.
async function isFirstDelivery(db: Db, key: string): Promise<boolean> {
  try {
    const { error } = await db.from('whatsapp_webhook_events').insert({ event_key: key })
    if (!error) return true
    if (error.code === '23505') return false
    console.error('dedupe unavailable, processing anyway', error.code, error.message)
  } catch (error) {
    console.error('dedupe unavailable, processing anyway', error)
  }
  return true
}

// deno-lint-ignore require-await
async function onCustomerMessage(message: Json): Promise<void> {
  console.log('customer message', message.type)
  // Your logic goes here. Example: answer with an approved template that has no variables.
  // if (message.from) await sendTemplate(message.from, 'opening_hours_v1', 'en_US')
}

function onStaffReply(echo: Json): void {
  // A person answered from the app. Do not treat it as a customer message.
  console.log('staff reply', echo.type)
}

function onStatus(status: Json): void {
  if (status.status === 'failed') {
    console.error('send failed', status.errors?.map((e: Json) => e.code))
  }
}

// Outbound sends go through the Dualhook Runtime API with the connection's dh_live_ key.
// deno-lint-ignore no-unused-vars
async function sendTemplate(to: string, name: string, languageCode: string): Promise<Json> {
  const phoneNumberId = Deno.env.get('WHATSAPP_PHONE_NUMBER_ID')
  const apiKey = Deno.env.get('DUALHOOK_API_KEY')
  if (!phoneNumberId || !apiKey) {
    throw new Error('Missing secret WHATSAPP_PHONE_NUMBER_ID or DUALHOOK_API_KEY')
  }

  const response = await fetch(`https://api.dualhook.com/v25.0/${phoneNumberId}/messages`, {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${apiKey}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      messaging_product: 'whatsapp',
      to,
      type: 'template',
      template: { name, language: { code: languageCode } },
    }),
  })
  const body: Json = await response.json().catch(() => ({}))
  if (!response.ok) {
    console.error('send rejected', response.status, response.headers.get('X-Dualhook-Request-Id'))
  }
  return body
}

Turn Off JWT Verification

By default Supabase checks the Authorization header of every request before your function runs. Meta's deliveries and Dualhook's forwards carry no Supabase credentials, so with the check on they get 401 with Missing authorization header and your code never runs.

Turn the check off for this function only, in supabase/config.toml. The setting takes effect when you deploy:

[functions.whatsapp-webhook]
verify_jwt = false

Two other ways do the same: supabase functions deploy whatsapp-webhook --no-verify-jwt, or in the Dashboard open the function's details and turn off JWT verification.

How this fits Supabase's API keys:

  • verify_jwt is a platform check for user JWTs. It also lets through a request that carries one of the project's publishable or secret API keys, but Meta sends neither.
  • In the code, withSupabase with auth: 'none' accepts every caller. Supabase documents that mode, together with verify_jwt = false, for external webhooks, and advises verifying the provider's signature in the handler. On a Dualhook connection you cannot, so the secret URL segment and the payload checks take that place.
  • ctx.supabaseAdmin still works. It is a Supabase client that uses the project's default secret key from the function's environment, so the key never appears in your code.

Store the Secrets

The function reads its configuration with Deno.env.get, from Supabase's Edge Function secrets:

SecretValueNeeded
WEBHOOK_PATH_SECRETA random string you generate. It is the last segment of the webhook URLBefore you connect
WHATSAPP_VERIFY_TOKENThe verify token you enter in DualhookBefore you connect
WHATSAPP_WABA_IDThe connection's WABA IDAs soon as signup completes
WHATSAPP_PHONE_NUMBER_IDThe connection's phone number IDAs soon as signup completes
DUALHOOK_API_KEYThe connection's dh_live_... keyBefore the first send

Generate the two random values with openssl rand -hex 24, put the secrets in a .env file that is in your .gitignore, and push it:

# .env
WEBHOOK_PATH_SECRET=<first random value>
WHATSAPP_VERIFY_TOKEN=<second random value>
WHATSAPP_WABA_ID=102290129340398
WHATSAPP_PHONE_NUMBER_ID=123456789012345
DUALHOOK_API_KEY=dh_live_your_key
supabase secrets set --env-file .env

In the Dashboard, the same secrets go under Edge Functions > Secrets: enter a Key and a Value, then click Save.

  • A secret name cannot start with SUPABASE_. That prefix is reserved for the variables Supabase injects, such as SUPABASE_URL and the API keys.
  • A function reads a new secret immediately. You do not need to redeploy.
  • For local runs with supabase functions serve, the same names go in supabase/functions/.env.

The handshake needs only the first two secrets, so you can connect before you know the IDs. Until WHATSAPP_WABA_ID and WHATSAPP_PHONE_NUMBER_ID are both set, the function answers every POST with 503 and the body Not configured, and logs Not configured. Missing secrets: with the names. Set them as soon as signup completes: Meta retries a failed delivery, but on a Coexistence number the one-time history sync starts right after onboarding.

Handle the Verification Handshake

Meta verifies your callback URL with a GET request that includes:

  • hub.mode=subscribe
  • hub.verify_token=<YOUR_VERIFY_TOKEN>
  • hub.challenge=<CHALLENGE_VALUE>

The function answers 200 with the hub.challenge value as a text/plain body when hub.mode is subscribe and hub.verify_token equals WHATSAPP_VERIFY_TOKEN. Any other GET gets 403.

Do not respond with JSON: Meta needs the raw challenge as the body, and Dualhook's setup check reports a JSON-wrapped challenge as a failure.

The verify token is checked on GET only. Real deliveries are POST requests with no hub.verify_token, so a token check on them drops every message. Dualhook uses the verify token you entered during connection setup, so the secret in Supabase and the value stored on the Dualhook connection must match.

Validate the Webhook Payload

The function validates every POST before it accepts the payload: the WhatsApp envelope shape, then the WABA ID and phone_number_id against the secrets you stored for this connection.

Check the envelope, WABA, and phone number

isExpectedPayload checks the envelope first and the field-specific identity second:

  • object equals whatsapp_business_account
  • every entry[].id equals WHATSAPP_WABA_ID
  • every entry has a non-empty changes array, and every change has a field
  • for message-path fields, value.metadata.phone_number_id is present and equals WHATSAPP_PHONE_NUMBER_ID

The same URL receives two kinds of fields:

  • Message-path fields, sent by Meta directly: messages (inbound messages and statuses), plus smb_message_echoes, history and smb_app_state_sync on Coexistence numbers. All four carry value.metadata.phone_number_id.
  • Management fields such as message_template_status_update or account_update, forwarded by Dualhook with an X-Dualhook-Event header and no X-Hub-Signature-256. They have no metadata.phone_number_id, so the function checks entry[].id only. See Forwarding Headers.

If the envelope or an ID check fails, the function responds 401 and stops. A field it does not process is not a failure: it returns 200 and logs the field name. Meta retries a rejected message-path delivery for up to 7 days, while a rejected management event is lost, because Dualhook forwards each one once.

processPayload then routes on field:

fieldWhat the function does
messagesCalls onCustomerMessage for each new inbound message and onStatus for each new status
smb_message_echoesCalls onStaffReply. A reply your staff sent from the WhatsApp Business app is never handled as a customer message
historyLogs phase, chunk_order and progress of each chunk, or the error code when the business declined sharing
smb_app_state_syncLogs the number of contact changes
Any other fieldLogs the field name and value.event. These are the management events Dualhook forwards

The sample event from Dualhook's Test endpoint passes the same checks. The function logs Dualhook Test endpoint ping for it and does nothing else.

Coexistence history sync: right after onboarding, Meta sends the one-time history sync in chunks, often hundreds of events and up to 3 MB each. Answer every chunk with 200, even ones you discard. Once Meta's retries end, Dualhook cannot request a rejected chunk again, and a re-onboard is not guaranteed to bring the history back. If you need the history, write each chunk to your own storage before you answer 200, not in the background work: Meta does not send a chunk again once it has a 200, and Dualhook has no copy. See History Webhook.

Keep the URL unguessable

The function compares the last path segment of every request with WEBHOOK_PATH_SECRET and answers 404 when it differs, before it looks at anything else. Treat the full URL as a secret: do not paste it into shared chat, do not commit it to repos, and rotate it (set a new WEBHOOK_PATH_SECRET, then update the URL in Dualhook) if it leaks. Meta accepts callback URLs of up to 200 characters, and Dualhook rejects a longer one.

The payload checks above stop stray and casual requests, but anyone who learns your URL and IDs could send a matching payload, so do not let a webhook alone trigger anything irreversible.

Respond Early with a Background Task

For a valid payload the function does no database or network work before it answers:

  1. It returns 200 as soon as the envelope and ID checks pass.
  2. It hands the rest to EdgeRuntime.waitUntil, Supabase's mechanism for background tasks. The function instance keeps running until that promise completes.

This keeps acknowledgments fast enough for Meta retries to stay rare, and well inside the 15 seconds Dualhook waits when it forwards a management event.

What Supabase documents about background tasks:

  • A task ends when the worker reaches a limit: 256 MB of memory, 2 seconds of CPU time, or the wall clock limit of 150 seconds on the Free plan and 400 seconds on paid plans. Time spent waiting on the database or on an HTTP call does not count as CPU time.
  • Catch errors inside the task. The function does, and logs webhook processing failed.
  • Locally, supabase functions serve ends the instance when the request completes, which cuts background tasks short. For local tests, add this to supabase/config.toml:
[edge_runtime]
policy = "per_worker"

Deduplicate with a Postgres Table

Meta can deliver the same event more than once. The function claims each event by inserting a key into a table with a primary key. A second insert of the same key fails with Postgres error 23505 (unique violation), and the function skips the event. If the insert fails for any other reason, such as a missing table, the function logs dedupe unavailable, processing anyway and processes the event: the result is duplicates, not lost messages.

Create the table before you connect the number, in the Dashboard's SQL Editor or in a migration:

create table public.whatsapp_webhook_events (
  event_key text primary key,
  received_at timestamptz not null default now()
);

alter table public.whatsapp_webhook_events enable row level security;
revoke all on table public.whatsapp_webhook_events from anon, authenticated;
grant select, insert, delete on table public.whatsapp_webhook_events to service_role;
  • The keys are message:<id> for inbound messages, status:<id>:<status> for statuses and echo:<id> for staff replies. The table holds message IDs, not message content.
  • ctx.supabaseAdmin uses a secret key, which bypasses Row Level Security. With RLS on and no policies, the table cannot be read with a publishable key.
  • Some projects do not grant privileges on new tables automatically, so the grant is explicit.
  • ctx.supabaseAdmin reaches the table through the project's Data API, so the Data API must be enabled and public must be one of its exposed schemas. Both are the default. With the Data API disabled, none of the auto-generated REST endpoints respond.
  • The example does not dedupe management events. Dualhook forwards each one once. It drops a management event only when it is identical to the last one logged for the same connection and event type (and, for template events, the same template) within 60 seconds, so make a management handler with side effects idempotent.

Delete old rows on a schedule, and keep them longer than Meta's 7 days of retries:

delete from public.whatsapp_webhook_events where received_at < now() - interval '30 days';

Send Template Messages via Dualhook

The function sends outbound messages through Dualhook's allowlisted runtime. Inbound routing remains direct from Meta.

sendTemplate makes this request with the dh_live_... key from the DUALHOOK_API_KEY secret:

  • Method: POST
  • URL: https://api.dualhook.com/v25.0/<PHONE_NUMBER_ID>/messages
  • Headers: Authorization: Bearer dh_live_... and Content-Type: application/json

Example template send:

{
  "messaging_product": "whatsapp",
  "to": "+12015550123",
  "type": "template",
  "template": {
    "name": "opening_hours_v1",
    "language": { "code": "en_US" }
  }
}

As written, the function sends nothing: the call in onCustomerMessage is commented out. The example assumes an approved template without variables, here the invented opening_hours_v1 in en_US. It checks message.from first, because an inbound message can arrive without it. Call sendTemplate from your own logic, and not for every inbound message: on a Coexistence number your staff may be answering the same chat in the app.

A send from onCustomerMessage runs inside the background task, after the 200. Dualhook never retries a send, and neither does the function. When a send is rejected it logs the HTTP status and the X-Dualhook-Request-Id response header, which you can give to support. An organization admin creates the key under Connection → Overview → Outbound API key, and the plaintext is shown once. See Runtime API Authentication.

For variables, media headers, and button parameters, see Sending Template Messages.

Test with Dualhook

  1. Deploy the function with JWT verification off, set WEBHOOK_PATH_SECRET and WHATSAPP_VERIFY_TOKEN, and create the dedupe table.

  2. Check the handshake yourself. This should return 200 with 1903260781 as the body:

    curl -i "https://<project-ref>.supabase.co/functions/v1/whatsapp-webhook/<WEBHOOK_PATH_SECRET>?hub.mode=subscribe&hub.verify_token=<WHATSAPP_VERIFY_TOKEN>&hub.challenge=1903260781"
  3. Put the full URL, including the secret segment, in Dualhook as the webhook URL, with the same verify token.

  4. As soon as signup completes, set WHATSAPP_WABA_ID, WHATSAPP_PHONE_NUMBER_ID and DUALHOOK_API_KEY.

  5. Run Dualhook Test endpoint to confirm reachability.

  6. Send a real WhatsApp message to your number.

  7. Open the function's Logs tab in the Supabase Dashboard and confirm that:

    • verification succeeds
    • payload validation accepts the sample event from Test endpoint (a Meta-shaped envelope with your WABA and phone number ID, an empty messages array and X-Dualhook-Event: test_ping): the function logs Dualhook Test endpoint ping
    • payload validation accepts the real Meta POST
    • the function returns 200 quickly
    • an inbound message logs customer message once
    • no dedupe unavailable line appears. If one does, the table is missing or the Data API cannot reach it, and duplicates are not filtered until you fix it
    • on Coexistence, a reply sent from the WhatsApp Business app logs staff reply. Also send one message through the Runtime API and check that no staff reply line appears for it

If requests return 401 with Missing authorization header, JWT verification is still on. If a POST returns 503 with Not configured, a secret is missing and the log names it. If every request returns 500 with MISSING_DEFAULT_PUBLISHABLE_KEY, the project has no default publishable key (see Prerequisites).

Production Caveats

  • A background task is not a queue. Once the function has answered 200, Meta does not send the event again, so work that fails or is cut off by a limit is gone. If you cannot lose an event, write it to a table of your own first and process it from there.
  • Keep message content out of the logs. Supabase keeps what your code prints. The function prints no message content: only field names, message types, counts, sync progress and error codes. Supabase's invocation logs record the request method, path and host, and the path contains the secret segment, so anyone who can read the project's logs can read the webhook URL.
  • Keep the dh_live_... key in Edge Function secrets only. Never put it in browser code or in a table your app can read.
  • Supabase charges per function invocation, regardless of the response status code. A message you send can return sent, delivered and read status webhooks on top of the inbound traffic.
  • Connections under the same WABA share one webhook URL and verify token. This function accepts one phone number ID, so a second number on the same WABA gets 401 until you extend the check to a list of IDs. Each connection has its own dh_live_... key.
  • Treat WhatsApp webhook payloads as evolving. With Meta's BSUID rollout and later username launch, some fields are conditional, and an inbound message can arrive without from. See the BSUID webhook changes reference.
  • If the function runs an AI agent, route on field first, so a staff reply in smb_message_echoes is not treated as a customer message. Keep the agent about your own business and give customers a way to reach a person: Meta's terms restrict general-purpose AI assistants, and its policy requires escalation paths when you automate replies. See AI agents on WhatsApp Business and human takeover.

Dualhook Boundary

Dualhook sets the Webhook Override at Meta so message-path webhooks go from Meta straight to your function URL, forwards management events to the same URL once each, and relays your sends through the Runtime API. It is not in the message path: it does not receive, store, re-sign, or replay the webhooks Meta sends to your function, and it does not store message content. Dualhook does not host or deploy the function and has no access to your Supabase project. The project, its secrets, its logs and the dedupe table are yours to run, and Dualhook cannot resend a webhook the function dropped.

Related

  • WhatsApp Webhook OverrideHow Dualhook uses WhatsApp Webhook Override to route supported customer-path webhooks directly from Meta to your server.
  • Messaging WebhookReal-time webhook events for inbound messages, delivery statuses, and errors.
  • smb_message_echoes WebhookField reference for WhatsApp smb_message_echoes webhooks: Business App sent-message echoes, edits, revokes, direct routing, and Dualhook handling.
  • Sending Template MessagesHow to send template messages via Cloud API with variables, media headers, and URL buttons.
  • Compliance & Data RetentionPrivacy boundary, configurable retention, CSV export, and organization isolation.
Browse more docsStart Free Trial