Skip to main content
Your server learns about a Trusted Account in two ways: the attestation token that the widget hands to your page, and the webhook events that BotShield sends to your endpoint. Use the token for the decision in the request. Use the webhooks to keep your records current, because an account can be unlinked when the person is not on your site. Every payload on this page carries an opaque handle or a request ID. None carries an email address, a name, a device, a BotShield ID, or any account on another platform.

The token

The attestation token is the same signed JWT that BotShield Gate issues. See Verify on your server for the format, the issuer, the 120-second lifetime and the published keys. Trusted Accounts adds three claims. A token without trusted_since is never trusted. Do not read a missing date as “trusted since the beginning”.

Verify with the API

POST /sdk/verify-token needs no API key.

Verify locally

This example uses jose.

What to check

  1. The token is valid and not expired.
  2. organization_id is your organization.
  3. request_id is the one your page sent with the token.
  4. trusted is true.
The token does not name the account. Your server knows which account it is because your signed-in user sent the token. Bind the result to that session.

When there is no token

GET /verification/status reports the same result by request_id. After the request completes, the response carries trusted and first_time. For a refused or failed request, reason is already_trusted, rebind_requires_prior_id or unavailable.

Webhook events

Set up delivery and signature verification first. See the Webhooks overview.
Check your endpoint’s event filter. An endpoint that is subscribed to specific event types receives only those types. It does not receive account.unlinked until you add it. An endpoint with no filter receives every type. Open your endpoint in the Console under Settings, Developer Tools, Webhooks, and add the new type.

gate.human_verified

The event gains two fields. Both are always present.
The other fields are described in Webhook events. (census is the API’s name for BotShield Gate.)

account.unlinked

Sent when a binding ends. The next confirmation on that account is a first-time confirmation again.
The event identifies the account by handle, not by your platform-user-ref. BotShield does not keep your reference in a readable form, so it cannot send it back. To find the handle for one of your users, search the Console registry by your user reference. The matching row shows the handle.

gate.unavailable

A request to secure an account that does not complete ends with this event.
failure_code is present only for the two binding conflicts. A request produces one terminal event. Use request_id as your idempotency key.

Keep your records current

Do not rely on webhooks alone. A later gate pass on the account reports the current trusted value in its token.