Package google.cloud.recaptchaenterprise.v1beta1

Index

RecaptchaEnterpriseServiceV1Beta1

Service to determine the likelihood an event is legitimate.

AnnotateAssessment

rpc AnnotateAssessment(AnnotateAssessmentRequest) returns (AnnotateAssessmentResponse)

Annotates a previously created Assessment to provide additional information on whether the event turned out to be authentic or fradulent.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

CreateAssessment

rpc CreateAssessment(CreateAssessmentRequest) returns (Assessment)

Creates an Assessment of the likelihood an event is legitimate.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

AnnotateAssessmentRequest

The request message to annotate an Assessment.

Fields
name

string

Required. The resource name of the Assessment, in the format "projects/{project_number}/assessments/{assessment_id}".

annotation

Annotation

Required. The annotation that will be assigned to the Event.

Annotation

Enum that reprensents the types of annotations.

Enums
ANNOTATION_UNSPECIFIED Default unspecified type.
LEGITIMATE Provides information that the event turned out to be legitimate.
FRAUDULENT Provides information that the event turned out to be fraudulent.
PASSWORD_CORRECT Provides information that the event was related to a login event in which the user typed the correct password.
PASSWORD_INCORRECT Provides information that the event was related to a login event in which the user typed the incorrect password.

AnnotateAssessmentResponse

Empty response for AnnotateAssessment.

Assessment

A recaptcha assessment resource.

Fields
name

string

Output only. The resource name for the Assessment in the format "projects/{project_number}/assessments/{assessment_id}".

event

Event

The event being assessed.

score

float

Output only. Legitimate event score from 0.0 to 1.0. (1.0 means very likely legitimate traffic while 0.0 means very likely non-legitimate traffic).

token_properties

TokenProperties

Output only. Properties of the provided event token.

reasons[]

ClassificationReason

Output only. Reasons contributing to the risk analysis verdict.

password_leak_verification

PasswordLeakVerification

Information about the user's credentials used to check for leaks. This feature is part of the Early Access Program (EAP). Exercise caution, and do not deploy integrations based on this feature in a production environment.

ClassificationReason

LINT.IfChange(classification_reason) Reasons contributing to the risk analysis verdict.

Enums
CLASSIFICATION_REASON_UNSPECIFIED Default unspecified type.
AUTOMATION Interactions matched the behavior of an automated agent.
UNEXPECTED_ENVIRONMENT The event originated from an illegitimate environment.
TOO_MUCH_TRAFFIC Traffic volume from the event source is higher than normal.
UNEXPECTED_USAGE_PATTERNS Interactions with the site were significantly different than expected patterns.
LOW_CONFIDENCE_SCORE Too little traffic has been received from this site thus far to generate quality risk analysis.

CreateAssessmentRequest

The create assessment request message.

Fields
parent

string

Required. The name of the project in which the assessment will be created, in the format "projects/{project_number}".

assessment

Assessment

Required. The assessment details.

Event

Fields
token

string

Optional. The user response token provided by the reCAPTCHA client-side integration on your site.

site_key

string

Optional. The site key that was used to invoke reCAPTCHA on your site and generate the token.

user_agent

string

Optional. The user agent present in the request from the user's device related to this event.

user_ip_address

string

Optional. The IP address in the request from the user's device related to this event.

expected_action

string

Optional. The expected action for this type of event. This should be the same action provided at token generation time on client-side platforms already integrated with recaptcha enterprise.

PasswordLeakVerification

Password leak verification info.

Fields
hashed_user_credentials

bytes

Optional. Scrypt hash of the username+password that the customer wants to verify against a known password leak.

credentials_leaked

bool

Output only. Whether or not the user's credentials are present in a known leak.

canonicalized_username

string

Optional. The username part of the user credentials for which we want to trigger a leak check in canonicalized form. This is the same data used to create the hashed_user_credentials on the customer side.

TokenProperties

Fields
valid

bool

Whether the provided user response token is valid. When valid = false, the reason could be specified in invalid_reason or it could also be due to a user failing to solve a challenge or a sitekey mismatch (i.e the sitekey used to generate the token was different than the one specified in the assessment).

invalid_reason

InvalidReason

Reason associated with the response when valid = false.

create_time

Timestamp

The timestamp corresponding to the generation of the token.

hostname

string

The hostname of the page on which the token was generated.

action

string

Action name provided at token generation.

InvalidReason

LINT.IfChange Enum that represents the types of invalid token reasons.

Enums
INVALID_REASON_UNSPECIFIED Default unspecified type.
UNKNOWN_INVALID_REASON If the failure reason was not accounted for.
MALFORMED The provided user verification token was malformed.
EXPIRED The user verification token had expired.
DUPE The user verification had already been seen.
SITE_MISMATCH

The user verification token did not match the provided site key. This may be a configuration error (e.g. development keys used in production) or end users trying to use verification tokens from other sites.

MISSING The user verification token was not present. It is a required input.