Turn it on
1
Create a Turnstile widget in Cloudflare
In the Cloudflare Turnstile dashboard, create a widget and add the same hostnames your agent’s widget runs on.
2
Paste both keys into Callers
Open your agent, go to Channels > Widget > Embed on Web, and fill in Site key and Secret key under Bot protection.
3
Save the agent
Protection switches on only when both keys are filled in. Clearing either key switches it off.
With the built-in widget
Nothing to change. When the agent has bot protection on, the SDK:- Reads the agent’s public configuration when it loads.
- Shows the Turnstile check inside the call card when the visitor starts a call, and removes it as soon as it’s solved.
- Sends the token with the call request.
Bring your own token
If you hide the built-in widget or run in a React Native WebView, solve Turnstile in your own UI and pass the token tocall(). When you pass a token, the SDK skips its own configuration fetch and challenge.
1
Get the site key
Read it at runtime from the agent’s public config (no authentication needed; the secret is never returned):When protection is off,
enabled is false and the other captcha fields are null.2
Render Turnstile with the web call action
The token must be created with the action
web-call-start, exported as WEB_CALL_CAPTCHA_ACTION. A token minted for any other action is rejected.3
Pass the token to call()
Cloudflare Turnstile runs only in browsers; there is no native mobile SDK. In React Native, render the challenge in a WebView and pass the token back to your code. See Headless and React Native.
Errors
Related
Authentication
Domains and tokens.
Troubleshooting
More error messages.