ok, so after a ton of tests and connecting with my lead dev I got it to work.
The key to getting Enterprise Recaptcha v3 to work in Marketo:
There is the front end script that adds recaptcha to your form page to get your token.
The back end processing to validate the token to get a score.
For the back end processing you will need:
- From Google Cloud:
- API Key, Site Key, Project ID
- From front end recaptcha response: Token
- From front end code:
- USER_ACTION - this is what you set in your front end script, most likely "form"
Marketo Webhook Settings
URL: recaptchaenterprise.googleapis.com/v1/projects/PROJECT_ID/assessments?key=API_KEY
Request Type: POST
Template:
{
"event": {
"token": "TOKEN",
"siteKey": "KEY",
"expectedAction": "USER_ACTION"
}
}
Request Token Encoding: JSON
Response Type: JSON
Custom Headers
Content-Type = application/json; charset=utf-8
The response will contain much more than free v3, a real response shown below with substitions for privacy marked as REDACTED.
{
"name": "REDACTED",
"event": {
"token": "REDACTED",
"siteKey": "REDACTED",
"userAgent": "",
"userIpAddress": "",
"expectedAction": "form",
"hashedAccountId": ""
},
"riskAnalysis": {
"score": 0.9,
"reasons": []
},
"tokenProperties": {
"valid": true,
"invalidReason": "INVALID_REASON_UNSPECIFIED",
"hostname": "REDACTED",
"androidPackageName": "",
"iosBundleId": "",
"action": "form",
"createTime": "2023-01-17T21:52:28.472Z"
}
}