Package google.cloud.recaptchaenterprise.v1

Index

RecaptchaEnterpriseService

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.

IAM Permissions

Requires the following Cloud IAM permission on the name resource:

  • recaptchaenterprise.assessments.annotate

For more information, see the Cloud IAM Documentation.

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.

IAM Permissions

Requires the following Cloud IAM permission on the parent resource:

  • recaptchaenterprise.assessments.create

For more information, see the Cloud IAM Documentation.

CreateKey

rpc CreateKey(CreateKeyRequest) returns (Key)

Creates a new reCAPTCHA Enterprise key.

Authorization Scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.

IAM Permissions

Requires the following Cloud IAM permission on the parent resource:

  • recaptchaenterprise.keys.create

For more information, see the Cloud IAM Documentation.

DeleteKey

rpc DeleteKey(DeleteKeyRequest) returns (Empty)

Deletes the specified key.

Authorization Scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.

IAM Permissions

Requires the following Cloud IAM permission on the name resource:

  • recaptchaenterprise.keys.delete

For more information, see the Cloud IAM Documentation.

GetKey

rpc GetKey(GetKeyRequest) returns (Key)

Returns the specified key.

Authorization Scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.

IAM Permissions

Requires the following Cloud IAM permission on the name resource:

  • recaptchaenterprise.keys.get

For more information, see the Cloud IAM Documentation.

ListKeys

rpc ListKeys(ListKeysRequest) returns (ListKeysResponse)

Returns the list of all keys that belong to a project.

Authorization Scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.

IAM Permissions

Requires the following Cloud IAM permission on the parent resource:

  • recaptchaenterprise.keys.list

For more information, see the Cloud IAM Documentation.

UpdateKey

rpc UpdateKey(UpdateKeyRequest) returns (Key)

Updates the specified key.

Authorization Scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.

IAM Permissions

Requires the following Cloud IAM permission on the name resource:

  • recaptchaenterprise.keys.update

For more information, see the Cloud IAM Documentation.

AndroidKeySettings

Settings specific to keys that can be used by Android apps.

Fields
allowed_package_names[]

string

Android package names of apps allowed to use the key. Example: 'com.companyname.appname'

AnnotateAssessmentRequest

The request message to annotate an Assessment.

Fields
name

string

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

Authorization requires the following IAM permission on the specified resource name:

  • recaptchaenterprise.assessments.annotate
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}/assessments/{assessment}".

event

Event

The event being assessed.

risk_analysis

RiskAnalysis

Output only. The risk analysis result for the event being assessed.

token_properties

TokenProperties

Output only. Properties of the provided event token.

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}".

Authorization requires the following IAM permission on the specified resource parent:

  • recaptchaenterprise.assessments.create
assessment

Assessment

Required. The assessment details.

CreateKeyRequest

The create key request message.

Fields
parent

string

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

Authorization requires the following IAM permission on the specified resource parent:

  • recaptchaenterprise.keys.create
key

Key

Required. Information to create a reCAPTCHA Enterprise key.

DeleteKeyRequest

The delete key request message.

Fields
name

string

Required. The name of the key to be deleted, in the format "projects/{project}/keys/{key}".

Authorization requires the following IAM permission on the specified resource name:

  • recaptchaenterprise.keys.delete

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.

GetKeyRequest

The get key request message.

Fields
name

string

Required. The name of the requested key, in the format "projects/{project}/keys/{key}".

Authorization requires the following IAM permission on the specified resource name:

  • recaptchaenterprise.keys.get

IOSKeySettings

Settings specific to keys that can be used by iOS apps.

Fields
allowed_bundle_ids[]

string

iOS bundle ids of apps allowed to use the key. Example: 'com.companyname.productname.appname'

Key

A key used to identify and configure applications (web and/or mobile) that use reCAPTCHA Enterprise.

Fields
name

string

The resource name for the Key in the format "projects/{project}/keys/{key}".

display_name

string

Human-readable display name of this key. Modifiable by user.

labels

map<string, string>

See Creating and managing labels.

create_time

Timestamp

The timestamp corresponding to the creation of this Key.

Union field platform_settings. Platform specific settings for this key. The key can only be used on one platform, the one it has settings for. platform_settings can be only one of the following:
web_settings

WebKeySettings

Settings for keys that can be used by websites.

android_settings

AndroidKeySettings

Settings for keys that can be used by Android apps.

ios_settings

IOSKeySettings

Settings for keys that can be used by iOS apps.

ListKeysRequest

The list keys request message.

Fields
parent

string

Required. The name of the project that contains the keys that will be listed, in the format "projects/{project}".

Authorization requires the following IAM permission on the specified resource parent:

  • recaptchaenterprise.keys.list
page_size

int32

Optional. The maximum number of keys to return. Default is 10. Max limit is 1000.

page_token

string

Optional. The next_page_token value returned from a previous. ListKeysRequest, if any.

ListKeysResponse

Response to request to list keys in a project.

Fields
keys[]

Key

Key details.

next_page_token

string

Token to retrieve the next page of results. It is set to empty if no keys remain in results.

RiskAnalysis

Risk analysis result for an event.

Fields
score

float

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).

reasons[]

ClassificationReason

Reasons contributing to the risk analysis verdict.

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.

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.
MISSING The user verification token was not present.

UpdateKeyRequest

The update key request message.

Fields
key

Key

Required. The key to update.

Authorization requires the following IAM permission on the specified resource key:

  • recaptchaenterprise.keys.update
update_mask

FieldMask

Optional. The mask to control which field of the key get updated. If the mask is not present, all fields will be updated.

WebKeySettings

Settings specific to keys that can be used by websites.

Fields
allow_all_domains

bool

If set to true, it means allowed_domains will not be enforced.

allowed_domains[]

string

Domains or subdomains of websites allowed to use the key. All subdomains of an allowed domain are automatically allowed. A valid domain requires a host and must not include any path, port, query or fragment. Examples: 'example.com' or 'subdomain.example.com'

allow_amp_traffic

bool

Required. Whether this key can be used on AMP (Accelerated Mobile Pages) websites. This can only be set for the SCORE integration type.

integration_type

IntegrationType

Required. Describes how this key is integrated with the website.

challenge_security_preference

ChallengeSecurityPreference

Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for IntegrationTypes CHECKBOX and INVISIBLE.

ChallengeSecurityPreference

Enum that represents the possible challenge frequency and difficulty configurations for a web key.

Enums
CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED Default type that indicates this enum hasn't been specified.
USABILITY Key tends to show fewer and easier challenges.
BALANCE Key tends to show balanced (in amount and difficulty) challenges.
SECURITY Key tends to show more and harder challenges.

IntegrationType

Enum that represents the integration types for web keys.

Enums
INTEGRATION_TYPE_UNSPECIFIED Default type that indicates this enum hasn't been specified. This is not a valid IntegrationType, one of the other types must be specified instead.
SCORE Only used to produce scores. It doesn't display the "I'm not a robot" checkbox and never shows captcha challenges.
CHECKBOX Displays the "I'm not a robot" checkbox and may show captcha challenges after it is checked.
INVISIBLE Doesn't display the "I'm not a robot" checkbox, but may show captcha challenges after risk analysis.