Use the hosted verification page when you don’t want to build the wallet handoff UI yourself. Your server creates the verification and redirects the user to the page. The page shows the QR code, follows the verification, and sends the user back to your site when it finishes. Your server then reads the result with its secret key, as in every other flow.
The test API doesn’t run the hosted page. Verifications you create there never carry verification_url, so build the wallet handoff into your own page with Verify a user.
1

Allow your site's origin

The page only sends users back to an origin registered for your project. Add the origin of your return page, such as https://shop.example.com, under Allowed origins. API keys explains where.The match is exact, so https://www.shop.example.com and https://shop.example.com are two origins. Test keys can also return to localhost and 127.0.0.1 without listing them. Live keys need an https origin on a public host.
2

Create the verification with a return URL

Pass return_url when you create the verification from your server. It’s the page on your site the user comes back to.
curl "$AUTHBOUND_API_URL/v1/verifications" \
  -H "Content-Type: application/json" \
  -H "X-Authbound-Key: $AUTHBOUND_SECRET_KEY" \
  -H "Idempotency-Key: verify-user-123-attempt-1" \
  -d '{
    "policy_id": "pol_identity_basic_eudi_v1",
    "return_url": "https://shop.example.com/verify/done"
  }'
The returnUrl option requires @authbound/server 0.5.0 or later.The response carries verification_url (verificationUrl in the SDK), the link to the hosted page for this verification. These are the fields this guide uses:
{
  "id": "vrf_abc123",
  "object": "verification",
  "verification_url": "https://verify.authbound.io/v/vrf_abc123#token=...&pk=pk_test_...",
  "return_url": "https://shop.example.com/verify/done"
}
Authbound checks return_url before it creates anything. It must be:
  • an absolute http or https URL of at most 2048 ASCII characters,
  • without a user name, password or fragment (#...), and
  • on an allowed origin, or localhost with a test key. A live key needs https and a public host, even when a localhost origin is listed.
A query string is fine. Anything else fails with 400 validation_error and "param": "return_url". So does any return_url on an API URL without the hosted page, such as the test API.
3

Store the ID and redirect

Save the verification ID in the user’s server-side session, then redirect the browser to verificationUrl. This example uses Express with express-session:
server.ts
import express from "express";
import session from "express-session";
import { AuthboundClient, AuthboundClientError } from "@authbound/server";

declare module "express-session" {
  interface SessionData {
    verificationId?: string;
    verified?: boolean;
  }
}

const authbound = new AuthboundClient({
  apiKey: process.env.AUTHBOUND_SECRET_KEY!,
  apiUrl: process.env.AUTHBOUND_API_URL!,
});

const app = express();

app.use(
  session({
    secret: process.env.SESSION_SECRET!,
    resave: false,
    saveUninitialized: false,
  })
);

app.post("/verify/start", async (req, res) => {
  const verification = await authbound.verifications.create({
    policyId: process.env.AUTHBOUND_POLICY_ID!,
    returnUrl: "https://shop.example.com/verify/done",
  });

  if (!verification.verificationUrl) {
    throw new Error("The hosted page isn't available for this verification");
  }

  req.session.verificationId = verification.id;
  res.redirect(303, verification.verificationUrl);
});
Authbound returns verificationUrl only on create, so redirect straight away rather than storing it.
4

Check the returning user

When the verification finishes, whether it was verified, failed, canceled or expired, the page shows the outcome. A few seconds later it sends the user to your return_url with verification_id added to the query, replacing any value already there:
https://shop.example.com/verify/done?verification_id=vrf_abc123
Compare that ID with the one in the session and reject a mismatch. Then read the result with your secret key:
server.ts
app.get("/verify/done", async (req, res) => {
  const expected = req.session.verificationId;

  if (!expected || req.query.verification_id !== expected) {
    return res.status(400).send("This verification isn't from your session.");
  }
  delete req.session.verificationId;

  try {
    const result = await authbound.verifications.getResult(expected);
    if (result.status === "verified") {
      req.session.verified = true;
      return res.redirect(303, "/account");
    }
  } catch (error) {
    // Canceled and expired verifications have no result.
    if (!(error instanceof AuthboundClientError) || error.statusCode !== 400) {
      throw error;
    }
  }

  res.redirect(303, "/verify?retry=1");
});
Only verified and failed verifications have a result. Treat a canceled or expired one like a failure and let the user try again. Webhooks and results covers the claims the result carries.

Keep the flow safe

verificationUrl is a bearer link. Its fragment carries the verification’s client token and your publishable key, so anyone who has it can follow the verification. Use it only to redirect the user’s browser. Never put it in a QR code, an email, a log line or analytics. The QR code for the wallet is on the page itself.
Always compare verification_id with the ID in the user’s session. Without that check, an attacker could complete a verification with their own wallet and send a victim to your return URL with its ID, and your app would mark the victim verified.
Read the outcome only from /v1/verifications/{id}/result with your secret key. The verification_id in the return URL tells you which verification finished, not how it ended.

When there’s no verification URL

verification_url is missing from the create response when the hosted page can’t run the verification:
  • The verification uses the Digital Credentials API (responseMode: "dc_api.jwt"). That flow runs in your own page.
  • Your self-hosted installation doesn’t run the hosted page.
  • You’re using the test API. It has no hosted verification page, so its responses carry client_action and no verification_url. It also refuses return_url.
  • An idempotent retry returned a verification that has already finished.
In the first three cases, render the wallet handoff in your own UI. Verify a user shows how with the browser SDK. A finished verification has nothing left to hand to a wallet, so your own UI can’t help either. If it’s verified or failed, read its result with GET /v1/verifications/{id}/result. To let the user try again, create a new verification with a new Idempotency-Key. Without return_url, the page still runs the verification. When it finishes, it tells the user they can close the tab, and your server learns the outcome from a webhook.

Next steps

Webhooks and results

Read the signed result and the claims the wallet disclosed.

Route protection

Gate pages on the verified state you stored.