Start here

Build with Bastion.

Developer guides for connecting your application to fraud scoring, bot protection, signed webhooks, and workspace SSO.

On this page

One collection layer. Your server in control.

Collect device and behavior telemetry in your frontend. Send the complete verification request to your backend. Your backend supplies trusted account and order details, calls Bastion with the site secret, and enforces the returned action before completing a sensitive operation.

StepRuns inResponsibility
01 · CollectCustomer browserPublic site key; fingerprint, behavior, environment, and token.
02 · VerifyYour application serverAuthenticate the customer, load authoritative context, and score with the secret key.
03 · EnforceYour application serverAllow, hold for review, challenge, or block.
04 · ReconcileYour webhook receiverVerify signatures and durably process decision.created deliveries.

Endpoints and credentials

bash
# Data plane: browser collection and server verification
BASTION_ENDPOINT=https://api.bastionsecurity.io/api/antibot

# Server environment only. Obtain keys in Workspace → Integration.
BASTION_SITE_KEY=YOUR_PUBLIC_SITE_KEY
BASTION_SECRET_KEY=YOUR_SERVER_SECRET

# Webhook receiver only. Obtain in Workspace → Webhooks.
BASTION_WEBHOOK_SECRET=YOUR_WEBHOOK_SIGNING_SECRET

Choose your implementation