I did follow their documentation on https://googleapis.dev/ruby/google-cloud-recaptcha_enterprise-v1/latest/index.html
I first added the env variable RECAPTCHA_ENTERPRISE_CREDENTIALS
then run the
client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new
documentation says response = client.create_assessment request
but documentation didn't add sample request so I did assume that it will look like in this documentation https://cloud.google.com/recaptcha-enterprise/docs/create-assessment
{
"event": {
"token": "token",
"siteKey": "key"
}
}
But when I execute the client.create_assessment
it is giving me error ArgumentError: Unknown field name 'event' in initialization map entry.
I also tried to follow this https://googleapis.dev/ruby/google-cloud-recaptcha_enterprise-v1/latest/Google/Cloud/RecaptchaEnterprise/V1/RecaptchaEnterpriseService/Client.html#create_assessment-instance_method
where the parameters is request and also gives me error ArgumentError: Unknown field name 'request' in initialization map entry.
What could be the correct parameter/request for creating assessment?
Gem I used is google-cloud-recaptcha_enterprise-v1
and google-cloud-recaptcha_enterprise