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.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.Create the verification with a return URL
Pass The Authbound checks
return_url when you create the verification from your server. It’s the page on your site the user comes back to.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:return_url before it creates anything. It must be:- an absolute
httporhttpsURL of at most 2048 ASCII characters, - without a user name, password or fragment (
#...), and - on an allowed origin, or
localhostwith a test key. A live key needshttpsand a public host, even when alocalhostorigin is listed.
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.Store the ID and redirect
Save the verification ID in the user’s server-side session, then redirect the browser to Authbound returns
verificationUrl. This example uses Express with express-session:server.ts
verificationUrl only on create, so redirect straight away rather than storing it.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 Compare that ID with the one in the session and reject a mismatch. Then read the result with your secret key:Only
return_url with verification_id added to the query, replacing any value already there:server.ts
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
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_actionand noverification_url. It also refusesreturn_url. - An idempotent retry returned a verification that has already finished.
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.