Reference documentation and code samples for the Google Cloud Recaptcha Enterprise V1 Client class TokenProperties.
Properties of the provided event token.
Generated from protobuf messagegoogle.cloud.recaptchaenterprise.v1.TokenProperties
Namespace
Google \ Cloud \ RecaptchaEnterprise \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ valid
bool
Output only. 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
int
Output only. Reason associated with the response when valid = false.
Output only. The timestamp corresponding to the generation of the token.
↳ hostname
string
Output only. The hostname of the page on which the token was generated (Web keys only).
↳ android_package_name
string
Output only. The name of the Android package with which the token was generated (Android keys only).
↳ ios_bundle_id
string
Output only. The ID of the iOS bundle with which the token was generated (iOS keys only).
↳ action
string
Output only. Action name provided at token generation.
getValid
Output only. 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).
Returns
Type
Description
bool
setValid
Output only. 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).
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getInvalidReason
Output only. Reason associated with the response when valid = false.
Returns
Type
Description
int
setInvalidReason
Output only. Reason associated with the response when valid = false.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getCreateTime
Output only. The timestamp corresponding to the generation of the token.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Recaptcha Enterprise V1 Client - Class TokenProperties (2.1.3)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.3 (latest)](/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.TokenProperties)\n- [2.1.2](/php/docs/reference/cloud-recaptcha-enterprise/2.1.2/V1.TokenProperties)\n- [2.0.1](/php/docs/reference/cloud-recaptcha-enterprise/2.0.1/V1.TokenProperties)\n- [1.17.2](/php/docs/reference/cloud-recaptcha-enterprise/1.17.2/V1.TokenProperties)\n- [1.16.1](/php/docs/reference/cloud-recaptcha-enterprise/1.16.1/V1.TokenProperties)\n- [1.15.0](/php/docs/reference/cloud-recaptcha-enterprise/1.15.0/V1.TokenProperties)\n- [1.14.0](/php/docs/reference/cloud-recaptcha-enterprise/1.14.0/V1.TokenProperties)\n- [1.13.0](/php/docs/reference/cloud-recaptcha-enterprise/1.13.0/V1.TokenProperties)\n- [1.12.2](/php/docs/reference/cloud-recaptcha-enterprise/1.12.2/V1.TokenProperties)\n- [1.8.0](/php/docs/reference/cloud-recaptcha-enterprise/1.8.0/V1.TokenProperties)\n- [1.7.0](/php/docs/reference/cloud-recaptcha-enterprise/1.7.0/V1.TokenProperties)\n- [1.6.0](/php/docs/reference/cloud-recaptcha-enterprise/1.6.0/V1.TokenProperties)\n- [1.5.2](/php/docs/reference/cloud-recaptcha-enterprise/1.5.2/V1.TokenProperties)\n- [1.4.2](/php/docs/reference/cloud-recaptcha-enterprise/1.4.2/V1.TokenProperties)\n- [1.3.2](/php/docs/reference/cloud-recaptcha-enterprise/1.3.2/V1.TokenProperties)\n- [1.2.6](/php/docs/reference/cloud-recaptcha-enterprise/1.2.6/V1.TokenProperties) \nReference documentation and code samples for the Google Cloud Recaptcha Enterprise V1 Client class TokenProperties.\n\nProperties of the provided event token.\n\nGenerated from protobuf message `google.cloud.recaptchaenterprise.v1.TokenProperties`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ RecaptchaEnterprise \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getValid\n\nOutput only. Whether the provided user response token is valid. When valid\n= false, the reason could be specified in invalid_reason or it could also\nbe due to a user failing to solve a challenge or a sitekey mismatch (i.e\nthe sitekey used to generate the token was different than the one specified\nin the assessment).\n\n### setValid\n\nOutput only. Whether the provided user response token is valid. When valid\n= false, the reason could be specified in invalid_reason or it could also\nbe due to a user failing to solve a challenge or a sitekey mismatch (i.e\nthe sitekey used to generate the token was different than the one specified\nin the assessment).\n\n### getInvalidReason\n\nOutput only. Reason associated with the response when valid = false.\n\n### setInvalidReason\n\nOutput only. Reason associated with the response when valid = false.\n\n### getCreateTime\n\nOutput only. The timestamp corresponding to the generation of the token.\n\n### hasCreateTime\n\n### clearCreateTime\n\n### setCreateTime\n\nOutput only. The timestamp corresponding to the generation of the token.\n\n### getHostname\n\nOutput only. The hostname of the page on which the token was generated (Web\nkeys only).\n\n### setHostname\n\nOutput only. The hostname of the page on which the token was generated (Web\nkeys only).\n\n### getAndroidPackageName\n\nOutput only. The name of the Android package with which the token was\ngenerated (Android keys only).\n\n### setAndroidPackageName\n\nOutput only. The name of the Android package with which the token was\ngenerated (Android keys only).\n\n### getIosBundleId\n\nOutput only. The ID of the iOS bundle with which the token was generated\n(iOS keys only).\n\n### setIosBundleId\n\nOutput only. The ID of the iOS bundle with which the token was generated\n(iOS keys only).\n\n### getAction\n\nOutput only. Action name provided at token generation.\n\n### setAction\n\nOutput only. Action name provided at token generation."]]