Send messages, images, video with WhatsApp.

Using the WhatsApp API with

You can use with any existing Node SDK or even just using fetch. Using io.runTask makes your WhatsApp background job resumable and appear in our dashboard.

  • Use io.runTask() and the official SDK or fetch.

  • Use our HTTP endpoint to subscribe to webhooks

  • Example code using WhatsApp

    Below are some working code examples of how you can use WhatsApp with These samples are open source and maintained by the community, you can copy and paste them into your own projects.

    import { TriggerClient, verifyRequestSignature } from "";
    // WhatsApp
    const whatsApp = client.defineHttpEndpoint({
    id: "whatsapp",
    source: "",
    icon: "whatsapp",
    // This is only needed for certain APIs like WhatsApp which don't setup the webhook until you pass the test
    respondWith: {
    // Don't trigger runs if they match this filter
    skipTriggeringRuns: true,
    filter: {
    method: ["GET"],
    query: {
    "hub.mode": [{ $startsWith: "sub" }],
    handler: async (request, verify) => {
    const searchParams = new URL(request.url).searchParams;
    if (
    searchParams.get("hub.verify_token") !==
    ) {
    return new Response("Unauthorized", { status: 401 });
    return new Response(searchParams.get("hub.challenge") ?? "OK", {
    status: 200,
    verify: async (request) => {
    return await verifyRequestSignature({
    headerName: "x-hub-signature-256",
    secret: process.env.WHATSAPP_APP_SECRET!,
    algorithm: "sha256",
    id: "http-whatsapp",
    name: "HTTP WhatsApp",
    version: "1.1.0",
    enabled: true,
    trigger: whatsApp.onRequest(),
    run: async (request, io, ctx) => {
    const body = await request.json();
    await`Body`, body);