Try to use a service account and authenticate with a Bearer token on your backend to call the ReCAPTCHA Enterprise API:
In this documentation, scroll down to the section: “REST API: Use the gcloud CLI”
POST https://recaptchaenterprise.googleapis.com/v1/projects/{PROJECT_ID}/assessments
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
Then, ensure the URL is not URL encoded in code:
Tip: Try replacing %7B and &7D
with your actual project-id and %7BAPI_KEY%7D
with your raw API key. Do not enclosed them to {}
or use it
From:
https://recaptchaenterprise.googleapis.com/v1/projects/%7BPROJECT_ID%7D/assessments?key=%7BAPI_KEY%7D
To:
https://recaptchaenterprise.googleapis.com/v1/projects/PROJECT_ID/assessments?key=API_KEY
If you’ve recently upgraded to Enterprise but haven’t updated your verification backend, that’s likely the source of your issue.