/
recaptchaenterprise_v1.projects.assessments.html
251 lines (223 loc) 路 16.2 KB
/
recaptchaenterprise_v1.projects.assessments.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="recaptchaenterprise_v1.html">reCAPTCHA Enterprise API</a> . <a href="recaptchaenterprise_v1.projects.html">projects</a> . <a href="recaptchaenterprise_v1.projects.assessments.html">assessments</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#annotate">annotate(name, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Annotates a previously created Assessment to provide additional information on whether the event turned out to be authentic or fraudulent.</p>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
<code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Creates an Assessment of the likelihood an event is legitimate.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="annotate">annotate(name, body=None, x__xgafv=None)</code>
<pre>Annotates a previously created Assessment to provide additional information on whether the event turned out to be authentic or fraudulent.
Args:
name: string, Required. The resource name of the Assessment, in the format "projects/{project}/assessments/{assessment}". (required)
body: object, The request body.
The object takes the form of:
{ # The request message to annotate an Assessment.
"annotation": "A String", # Optional. The annotation that will be assigned to the Event. This field can be left empty to provide reasons that apply to an event without concluding whether the event is legitimate or fraudulent.
"hashedAccountId": "A String", # Optional. Unique stable hashed user identifier to apply to the assessment. This is an alternative to setting the hashed_account_id in CreateAssessment, for example when the account identifier is not yet known in the initial request. It is recommended that the identifier is hashed using hmac-sha256 with stable secret.
"reasons": [ # Optional. Optional reasons for the annotation that will be assigned to the Event.
"A String",
],
"transactionEvent": { # Describes an event in the lifecycle of a payment transaction. # Optional. If the Assessment is part of a Payment Transaction, provide details on Payment Lifecycle Events that occur in the Transaction.
"eventTime": "A String", # Optional. Timestamp when this transaction event occurred; otherwise assumed to be the time of the API call.
"eventType": "A String", # Optional. The type of this transaction event.
"reason": "A String", # Optional. The reason or standardized code which corresponds with this transaction event, if one exists. E.g. a CHARGEBACK Event with code 4553.
"value": 3.14, # Optional. The value that corresponds with this transaction event, if one exists. E.g. A refund event where $5.00 was refunded. Currency is obtained from the original transaction data.
},
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Empty response for AnnotateAssessment.
}</pre>
</div>
<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
</div>
<div class="method">
<code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
<pre>Creates an Assessment of the likelihood an event is legitimate.
Args:
parent: string, Required. The name of the project in which the assessment will be created, in the format "projects/{project}". (required)
body: object, The request body.
The object takes the form of:
{ # A reCAPTCHA Enterprise assessment resource.
"accountDefenderAssessment": { # Account defender risk assessment. # Assessment returned by account defender when a hashed_account_id is provided.
"labels": [ # Labels for this request.
"A String",
],
},
"accountVerification": { # Information about account verification, used for identity verification. # Account verification information for identity verification. The assessment event must include a token and site key to use this feature.
"endpoints": [ # Endpoints that can be used for identity verification.
{ # Information about a verification endpoint that can be used for 2FA.
"emailAddress": "A String", # Email address for which to trigger a verification request.
"lastVerificationTime": "A String", # Output only. Timestamp of the last successful verification for the endpoint, if any.
"phoneNumber": "A String", # Phone number for which to trigger a verification request. Should be given in E.164 format.
"requestToken": "A String", # Output only. Token to provide to the client to trigger endpoint verification. It must be used within 15 minutes.
},
],
"languageCode": "A String", # Language code preference for the verification message, set as a IETF BCP 47 language code.
"latestVerificationResult": "A String", # Output only. Result of the latest account verification challenge.
"username": "A String", # Username of the account that is being verified. Deprecated. Customers should now provide the hashed account ID field in Event.
},
"event": { # The event being assessed.
"expectedAction": "A 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.
"hashedAccountId": "A String", # Optional. Unique stable hashed user identifier for the request. The identifier must be hashed using hmac-sha256 with stable secret.
"siteKey": "A String", # Optional. The site key that was used to invoke reCAPTCHA Enterprise on your site and generate the token.
"token": "A String", # Optional. The user response token provided by the reCAPTCHA Enterprise client-side integration on your site.
"userAgent": "A String", # Optional. The user agent present in the request from the user's device related to this event.
"userIpAddress": "A String", # Optional. The IP address in the request from the user's device related to this event.
},
"name": "A String", # Output only. The resource name for the Assessment in the format "projects/{project}/assessments/{assessment}".
"privatePasswordLeakVerification": { # Private password leak verification info. # The private password leak verification field contains the parameters that are used to to check for leaks privately without sharing user credentials.
"encryptedLeakMatchPrefixes": [ # Output only. List of prefixes of the encrypted potential password leaks that matched the given parameters. They must be compared with the client-side decryption prefix of `reencrypted_user_credentials_hash`
"A String",
],
"encryptedUserCredentialsHash": "A String", # Optional. Encrypted Scrypt hash of the canonicalized username+password. It is re-encrypted by the server and returned through `reencrypted_user_credentials_hash`.
"lookupHashPrefix": "A String", # Optional. Exactly 26-bit prefix of the SHA-256 hash of the canonicalized username. It is used to look up password leaks associated with that hash prefix.
"reencryptedUserCredentialsHash": "A String", # Output only. Corresponds to the re-encryption of the `encrypted_user_credentials_hash` field. It is used to match potential password leaks within `encrypted_leak_match_prefixes`.
},
"riskAnalysis": { # Risk analysis result for an event. # Output only. The risk analysis result for the event being assessed.
"reasons": [ # Reasons contributing to the risk analysis verdict.
"A String",
],
"score": 3.14, # 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).
},
"tokenProperties": { # Output only. Properties of the provided event token.
"action": "A String", # Action name provided at token generation.
"androidPackageName": "A String", # The name of the Android package with which the token was generated (Android keys only).
"createTime": "A String", # The timestamp corresponding to the generation of the token.
"hostname": "A String", # The hostname of the page on which the token was generated (Web keys only).
"invalidReason": "A String", # Reason associated with the response when valid = false.
"iosBundleId": "A String", # The ID of the iOS bundle with which the token was generated (iOS keys only).
"valid": True or False, # 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).
},
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # A reCAPTCHA Enterprise assessment resource.
"accountDefenderAssessment": { # Account defender risk assessment. # Assessment returned by account defender when a hashed_account_id is provided.
"labels": [ # Labels for this request.
"A String",
],
},
"accountVerification": { # Information about account verification, used for identity verification. # Account verification information for identity verification. The assessment event must include a token and site key to use this feature.
"endpoints": [ # Endpoints that can be used for identity verification.
{ # Information about a verification endpoint that can be used for 2FA.
"emailAddress": "A String", # Email address for which to trigger a verification request.
"lastVerificationTime": "A String", # Output only. Timestamp of the last successful verification for the endpoint, if any.
"phoneNumber": "A String", # Phone number for which to trigger a verification request. Should be given in E.164 format.
"requestToken": "A String", # Output only. Token to provide to the client to trigger endpoint verification. It must be used within 15 minutes.
},
],
"languageCode": "A String", # Language code preference for the verification message, set as a IETF BCP 47 language code.
"latestVerificationResult": "A String", # Output only. Result of the latest account verification challenge.
"username": "A String", # Username of the account that is being verified. Deprecated. Customers should now provide the hashed account ID field in Event.
},
"event": { # The event being assessed.
"expectedAction": "A 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.
"hashedAccountId": "A String", # Optional. Unique stable hashed user identifier for the request. The identifier must be hashed using hmac-sha256 with stable secret.
"siteKey": "A String", # Optional. The site key that was used to invoke reCAPTCHA Enterprise on your site and generate the token.
"token": "A String", # Optional. The user response token provided by the reCAPTCHA Enterprise client-side integration on your site.
"userAgent": "A String", # Optional. The user agent present in the request from the user's device related to this event.
"userIpAddress": "A String", # Optional. The IP address in the request from the user's device related to this event.
},
"name": "A String", # Output only. The resource name for the Assessment in the format "projects/{project}/assessments/{assessment}".
"privatePasswordLeakVerification": { # Private password leak verification info. # The private password leak verification field contains the parameters that are used to to check for leaks privately without sharing user credentials.
"encryptedLeakMatchPrefixes": [ # Output only. List of prefixes of the encrypted potential password leaks that matched the given parameters. They must be compared with the client-side decryption prefix of `reencrypted_user_credentials_hash`
"A String",
],
"encryptedUserCredentialsHash": "A String", # Optional. Encrypted Scrypt hash of the canonicalized username+password. It is re-encrypted by the server and returned through `reencrypted_user_credentials_hash`.
"lookupHashPrefix": "A String", # Optional. Exactly 26-bit prefix of the SHA-256 hash of the canonicalized username. It is used to look up password leaks associated with that hash prefix.
"reencryptedUserCredentialsHash": "A String", # Output only. Corresponds to the re-encryption of the `encrypted_user_credentials_hash` field. It is used to match potential password leaks within `encrypted_leak_match_prefixes`.
},
"riskAnalysis": { # Risk analysis result for an event. # Output only. The risk analysis result for the event being assessed.
"reasons": [ # Reasons contributing to the risk analysis verdict.
"A String",
],
"score": 3.14, # 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).
},
"tokenProperties": { # Output only. Properties of the provided event token.
"action": "A String", # Action name provided at token generation.
"androidPackageName": "A String", # The name of the Android package with which the token was generated (Android keys only).
"createTime": "A String", # The timestamp corresponding to the generation of the token.
"hostname": "A String", # The hostname of the page on which the token was generated (Web keys only).
"invalidReason": "A String", # Reason associated with the response when valid = false.
"iosBundleId": "A String", # The ID of the iOS bundle with which the token was generated (iOS keys only).
"valid": True or False, # 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).
},
}</pre>
</div>
</body></html>