Overview
Google reCAPTCHA Enterprise provides advanced bot detection and risk analysis capabilities. This guide shows you how to migrate from standard reCAPTCHA v3 to the Enterprise version and configure it properly.Prerequisites
Before using reCAPTCHA Enterprise:- Set up a Google Cloud project
- Enable the reCAPTCHA Enterprise API
- Create Enterprise keys with Scoring integration type (equivalent to reCAPTCHA v3)
- Configure your domain/app package name
The Integration type must be set to Scoring for compatibility with this library, as it’s equivalent to reCAPTCHA v3’s scoring mechanism.
Basic Setup
Configuration Options
All standard configuration options work with Enterprise mode:Key Configuration Properties
Enables Enterprise mode. When
true, the library loads enterprise.js instead of api.js.When combined with
useEnterprise, loads from https://www.recaptcha.net/recaptcha/enterprise.js for regions where google.com is blocked.Script Loading Behavior
WhenuseEnterprise is enabled, the library automatically:
- Loads the Enterprise script:
https://www.google.com/recaptcha/enterprise.js - Accesses the Enterprise API: Uses
window.grecaptcha.enterpriseinstead ofwindow.grecaptcha - Executes with Enterprise context: All token generation uses the Enterprise backend
With recaptcha.net (for global availability)
https://www.recaptcha.net/recaptcha/enterprise.js
Backend Verification
Verify tokens on your backend using the Enterprise API:Migration from Standard v3
Create Enterprise keys
Generate new Enterprise keys in Google Cloud Console with Scoring integration type.
Troubleshooting
Error: Invalid site key
Error: Invalid site key
Cause: Using a standard reCAPTCHA v3 key instead of an Enterprise key.Solution: Create new keys specifically for Enterprise in Google Cloud Console. Standard keys will not work with
useEnterprise={true}.Error: Integration type not supported
Error: Integration type not supported
Cause: Enterprise key was created with Checkbox integration type instead of Scoring.Solution: Create a new Enterprise key and select Scoring as the integration type.
Script loads but executeRecaptcha is undefined
Script loads but executeRecaptcha is undefined
Cause: The Enterprise script may not have loaded properly.Solution:
- Check browser console for script loading errors
- Verify your site key is correct
- Ensure the domain is registered in Google Cloud Console
Backend verification fails
Backend verification fails
Cause: Mismatch between frontend and backend configuration.Solution:
- Ensure you’re using the Enterprise verification API, not the standard v3 API
- Verify the project ID and site key match in both frontend and backend
- Check that the action name matches between
executeRecaptcha('action')and backend verification
Advanced: Custom Container with Enterprise
You can combine Enterprise mode with custom badge rendering:Best Practices
Use meaningful actions
Name your actions descriptively (e.g.,
'login', 'purchase', 'contact_form') to get better analytics in the Enterprise dashboard.Implement score-based logic
Use different risk score thresholds for different actions. Critical actions may require higher scores.
Monitor in Cloud Console
Use the reCAPTCHA Enterprise dashboard to analyze traffic patterns and adjust your score thresholds.
Handle verification server-side
Always verify tokens on your backend. Never trust client-side validation alone.