Shield
Was this form sent from a person’s browser? Use it where you would put a CAPTCHA. About Shield
Switch: data-signet on a form. success is false for a bot, and for a token that is unknown, too old or already used.
The call
POST /v1/shield/verify, when the form is posted. The token is the session ID the tag put in your form.
POST /v1/shield/verify
Authorization: Bearer sk_live_...
{ "token": "s_...", "ip": "203.0.113.7", "user_agent": "Mozilla/5.0 ..." }
{ "success": true, "verdict": "human", "bot_likelihood": 0, "reason_codes": [],
"session_id": "s_...", "visitor_id": "v_...", "solved_at": "...", "origin": "https://shop.example" }
| Field | Meaning |
|---|---|
token | Required. Works once. |
ip, user_agent | Optional. The visitor’s, on the form post. A difference makes the verdict suspicious (SESSION_IP_MISMATCH, SESSION_USER_AGENT_MISMATCH). |
max_age_seconds | Optional. How old a token may be: 30 to 3600, default 600. |
What to do
Read success. It is false for a bot and for a token that cannot be used.
verdict | Meaning | Do this |
|---|---|---|
human | Nothing suggests automation. | Accept. |
suspicious | Weaker evidence, or a session mismatch. | Add a second factor or an email link. Do not reject outright. |
bot | Strong evidence of automation. | Block. |
Error (status 200, success: false) | Meaning |
|---|---|
invalid_token | Unknown, or another account’s. |
expired | Older than max_age_seconds. |
already_used | Accepted once before. |
Form trap
Add a hidden field to the form. A post that fills it in is called a bot, and an assessment carries FORM_TRAP_FILLED.
<form data-signet data-signet-trap> <!-- or data-signet-trap="name" to rename the field -->
The field is company_site unless you rename it. Leave it out of your own validation; your server can refuse a post where it is not empty. What was typed is never read.
Test values
test_allow, test_review and test_deny give human, suspicious and bot.
Limits and errors
For velocity, labels and lists, also call /v1/assess; verifying a token does not use it up there or in /v1/sessions. For more resistance, turn on the optional protections (PUT /v1/identification, proof_of_work_bits) and set the collect challenge to enforce. Also the common errors.