The Express router gives your backend everything the browser SDKs need: starting verifications, setting a session cookie when one succeeds, and receiving webhooks. Pair it with the React or Vue SDK on the frontend, served from the same origin.
1

Install

pnpm add @authbound/server express cookie-parser
2

Add your keys

.env
AUTHBOUND_SECRET_KEY=sk_test_...
AUTHBOUND_PUBLISHABLE_KEY=pk_test_...
AUTHBOUND_API_URL=https://sandbox-check.authbound.io
AUTHBOUND_SESSION_SECRET=...
AUTHBOUND_WEBHOOK_SECRET=whsec_...
AUTHBOUND_API_URL is the API URL for your key’s mode. Generate the session secret with openssl rand -base64 32. Copy the webhook secret from the endpoint you add on your project’s Webhooks page in the dashboard.
3

Mount the router

server.ts
import cookieParser from "cookie-parser";
import express from "express";
import { createAuthboundRouter } from "@authbound/server/express";

const app = express();

// Keep the raw body so the router can check webhook signatures.
app.use(
  express.json({
    verify: (req, _res, buf) => {
      (req as express.Request & { rawBody?: Buffer }).rawBody = Buffer.from(buf);
    },
  })
);
app.use(cookieParser());

app.use(
  "/api/authbound",
  createAuthboundRouter({
    apiKey: process.env.AUTHBOUND_SECRET_KEY!,
    apiUrl: process.env.AUTHBOUND_API_URL!,
    publishableKey: process.env.AUTHBOUND_PUBLISHABLE_KEY!,
    secret: process.env.AUTHBOUND_SESSION_SECRET!,
    webhookSecret: process.env.AUTHBOUND_WEBHOOK_SECRET!,
    routes: {
      protected: [],
      verify: "/verify",
      callback: "/api/authbound/callback",
    },
  })
);

app.listen(3000);

Routes the router adds

RouteWhat it does
POST /api/authbound/verificationStarts a verification and returns the wallet handoff to the browser.
POST /api/authbound/sessionSets the session cookie after a successful verification.
POST /api/authbound/callbackReceives webhooks. Add this URL as a webhook endpoint in the dashboard.
GET /api/authbound/statusReads the session cookie.
DELETE /api/authboundSigns the user out by clearing the session cookie.

Next steps