Smaws_Client_CognitoIdentityProvider.RespondToAuthChallengeSome API operations in a user pool generate a challenge, like a prompt for an MFA code, for device authentication that bypasses MFA, or for a custom authentication challenge. A RespondToAuthChallenge API request provides the answer to that challenge, like a code or a secure remote password (SRP). The parameters of a response to an authentication challenge vary with the type of challenge.
For more information about custom authentication challenges, see Custom authentication challenge Lambda triggers.
Amazon Cognito doesn't evaluate Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you can't use IAM credentials to authorize requests, and you can't grant IAM permissions in policies. For more information about authorization models in Amazon Cognito, see Using the Amazon Cognito user pools API and user pool endpoints.
This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers require you to register an origination phone number before you can send SMS messages to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a phone number with Amazon Pinpoint. Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must receive SMS messages might not be able to sign up, activate their accounts, or sign in.
If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Services service, Amazon Simple Notification Service might place your account in the SMS sandbox. In sandbox mode, you can send messages only to verified phone numbers. After you test your app while in the sandbox environment, you can move out of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito Developer Guide.
val error_to_string :
[ Smaws_Lib.Protocols.AwsJson.error
| `AliasExistsException of Types.alias_exists_exception
| `CodeMismatchException of Types.code_mismatch_exception
| `ExpiredCodeException of Types.expired_code_exception
| `ForbiddenException of Types.forbidden_exception
| `InternalErrorException of Types.internal_error_exception
| `InvalidEmailRoleAccessPolicyException of
Types.invalid_email_role_access_policy_exception
| `InvalidLambdaResponseException of Types.invalid_lambda_response_exception
| `InvalidParameterException of Types.invalid_parameter_exception
| `InvalidPasswordException of Types.invalid_password_exception
| `InvalidSmsRoleAccessPolicyException of
Types.invalid_sms_role_access_policy_exception
| `InvalidSmsRoleTrustRelationshipException of
Types.invalid_sms_role_trust_relationship_exception
| `InvalidUserPoolConfigurationException of
Types.invalid_user_pool_configuration_exception
| `MFAMethodNotFoundException of Types.mfa_method_not_found_exception
| `NotAuthorizedException of Types.not_authorized_exception
| `OperationNotEnabledException of Types.operation_not_enabled_exception
| `PasswordHistoryPolicyViolationException of
Types.password_history_policy_violation_exception
| `PasswordResetRequiredException of Types.password_reset_required_exception
| `ResourceNotFoundException of Types.resource_not_found_exception
| `SoftwareTokenMFANotFoundException of
Types.software_token_mfa_not_found_exception
| `TooManyRequestsException of Types.too_many_requests_exception
| `UnexpectedLambdaException of Types.unexpected_lambda_exception
| `UserLambdaValidationException of Types.user_lambda_validation_exception
| `UserNotConfirmedException of Types.user_not_confirmed_exception
| `UserNotFoundException of Types.user_not_found_exception ] ->
stringval request :
'http_type Smaws_Lib.Context.t ->
Types.respond_to_auth_challenge_request ->
(Types.respond_to_auth_challenge_response,
[> Smaws_Lib.Protocols.AwsJson.error
| `AliasExistsException of Types.alias_exists_exception
| `CodeMismatchException of Types.code_mismatch_exception
| `ExpiredCodeException of Types.expired_code_exception
| `ForbiddenException of Types.forbidden_exception
| `InternalErrorException of Types.internal_error_exception
| `InvalidEmailRoleAccessPolicyException of
Types.invalid_email_role_access_policy_exception
| `InvalidLambdaResponseException of
Types.invalid_lambda_response_exception
| `InvalidParameterException of Types.invalid_parameter_exception
| `InvalidPasswordException of Types.invalid_password_exception
| `InvalidSmsRoleAccessPolicyException of
Types.invalid_sms_role_access_policy_exception
| `InvalidSmsRoleTrustRelationshipException of
Types.invalid_sms_role_trust_relationship_exception
| `InvalidUserPoolConfigurationException of
Types.invalid_user_pool_configuration_exception
| `MFAMethodNotFoundException of Types.mfa_method_not_found_exception
| `NotAuthorizedException of Types.not_authorized_exception
| `OperationNotEnabledException of Types.operation_not_enabled_exception
| `PasswordHistoryPolicyViolationException of
Types.password_history_policy_violation_exception
| `PasswordResetRequiredException of
Types.password_reset_required_exception
| `ResourceNotFoundException of Types.resource_not_found_exception
| `SoftwareTokenMFANotFoundException of
Types.software_token_mfa_not_found_exception
| `TooManyRequestsException of Types.too_many_requests_exception
| `UnexpectedLambdaException of Types.unexpected_lambda_exception
| `UserLambdaValidationException of Types.user_lambda_validation_exception
| `UserNotConfirmedException of Types.user_not_confirmed_exception
| `UserNotFoundException of Types.user_not_found_exception ])
Stdlib.resultval request_with_metadata :
'http_type Smaws_Lib.Context.t ->
Types.respond_to_auth_challenge_request ->
(Types.respond_to_auth_challenge_response Smaws_Lib.Response.t,
[> Smaws_Lib.Protocols.AwsJson.error
| `AliasExistsException of Types.alias_exists_exception
| `CodeMismatchException of Types.code_mismatch_exception
| `ExpiredCodeException of Types.expired_code_exception
| `ForbiddenException of Types.forbidden_exception
| `InternalErrorException of Types.internal_error_exception
| `InvalidEmailRoleAccessPolicyException of
Types.invalid_email_role_access_policy_exception
| `InvalidLambdaResponseException of
Types.invalid_lambda_response_exception
| `InvalidParameterException of Types.invalid_parameter_exception
| `InvalidPasswordException of Types.invalid_password_exception
| `InvalidSmsRoleAccessPolicyException of
Types.invalid_sms_role_access_policy_exception
| `InvalidSmsRoleTrustRelationshipException of
Types.invalid_sms_role_trust_relationship_exception
| `InvalidUserPoolConfigurationException of
Types.invalid_user_pool_configuration_exception
| `MFAMethodNotFoundException of Types.mfa_method_not_found_exception
| `NotAuthorizedException of Types.not_authorized_exception
| `OperationNotEnabledException of Types.operation_not_enabled_exception
| `PasswordHistoryPolicyViolationException of
Types.password_history_policy_violation_exception
| `PasswordResetRequiredException of
Types.password_reset_required_exception
| `ResourceNotFoundException of Types.resource_not_found_exception
| `SoftwareTokenMFANotFoundException of
Types.software_token_mfa_not_found_exception
| `TooManyRequestsException of Types.too_many_requests_exception
| `UnexpectedLambdaException of Types.unexpected_lambda_exception
| `UserLambdaValidationException of Types.user_lambda_validation_exception
| `UserNotConfirmedException of Types.user_not_confirmed_exception
| `UserNotFoundException of Types.user_not_found_exception ]
* Smaws_Lib.Response.metadata)
Stdlib.result