validate_notify_code_verification
async
¶
validate_notify_code_verification(
destination_identity: DestinationIdentity,
code: VerificationCode,
*,
config_overrides: Optional[AsyncEndUserMessagingClientConfig] = None,
reference_id: Optional[ReferenceId] = None,
) -> ValidateNotifyCodeVerificationOutput
Validates a one-time passcode that a recipient submitted. Validation succeeds when the passcode matches, the validity period has not elapsed, and the maximum number of attempts has not been exceeded.
Parameters:
-
destination_identity(DestinationIdentity) –The recipient identifier. For the TEXT and VOICE channels, specify an E.164 phone number. For the WhatsApp channel, specify a WhatsApp address.
-
reference_id(Optional[ReferenceId], default:None) –The caller-supplied reference identifier used to locate the verification. This value must match the value that you supplied to the SendNotifyCodeVerification operation.
-
code(VerificationCode) –The one-time passcode that the recipient submitted for validation.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
InternalServerException–An unexpected error occurred during the processing of the request.
-
ThrottlingException–The request was denied because it exceeded the allowed request rate.
-
ValidationException–A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Validate a submitted one-time passcode
>>> await client.validate_notify_code_verification(destination_identity='+14255550100', reference_id='signup-flow-42', code='123456')
Source code in docs_src/capo_endusermessaging/_services/async_end_user_messaging.py
2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 | |