What is Assessment in AssessmentName in Google recaptcha

740 Views Asked by At

We need to give the AssessmentName CreateAssessmentRequest in google captcha varification. It is in the format projects/{projectname}/assessments/{assessment}.

what is this {assessment} part refers to?

https://cloud.google.com/recaptcha-enterprise/docs/create-assessment

Thanks, Anish

1

There are 1 best solutions below

1
On

A request will be sent to the reCAPTCHA Enterprise API to create the assessment. Similar to the following, In that request only event will be sent in a file called request.json.

{
  "event": {
    "token": "TOKEN",
    "siteKey": "KEY",
    "expectedAction": "USER_ACTION"
  }
}

name, riskAnalysis and tokenProperties fields are outputs only. You will get the clarity after seeing the JSON response below.

After sending a request either by using curl or PowerShell JSON response will be received similar to the following. At the name field in this response you can see what the {assessment} is.

{
  "tokenProperties": {
    "valid": true,
    "hostname": "www.google.com",
    "action": "homepage",
    "createTime": "2019-03-28T12:24:17.894Z"
   },
  "riskAnalysis": {
    "score": 0.1,
    "reasons": ["AUTOMATION"]
  },
 "event": {
    "token": "TOKEN",
    "siteKey": "KEY",
    "expectedAction": "USER_ACTION"
  },
  "name": "projects/PROJECT_ID/assessments/b6ac310000000000"
}

For more information refer to the following documentation.