v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-14101465558.4 KB

Allows a user to enter a confirmation code to reset a forgotten password.

post/#X-Amz-Target=AWSCognitoIdentityProviderService.ConfirmForgotPassword

Headers

X-Amz-Target'AWSCognitoIdentityProviderService.ConfirmForgotPassword' required

Request body

ClientIdstring password required

The app client ID of the app associated with the user pool.

SecretHashstring password

A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

Usernamestring password required

The user name of the user for whom you want to enter a code to retrieve a forgotten password.

ConfirmationCodestring required

The confirmation code from your user's request to reset their password. For more information, see <a href="https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ForgotPassword.html">ForgotPassword</a>.

Passwordstring password required

The new password that your user wants to set.

ClientMetadataobject
<p>A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.</p> <p>You create custom workflows by assigning Lambda functions to user pool triggers. When you use the ConfirmForgotPassword API action, Amazon Cognito invokes the function that is assigned to the <i>post confirmation</i> trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a <code>clientMetadata</code> attribute, which provides the data that you assigned to the ClientMetadata parameter in your ConfirmForgotPassword request. In your function code in Lambda, you can process the <code>clientMetadata</code> value to enhance your workflow for your specific needs.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html"> Customizing user pool Workflows with Lambda Triggers</a> in the <i>Amazon Cognito Developer Guide</i>.</p> <note> <p>When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:</p> <ul> <li> <p>Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.</p> </li> <li> <p>Validate the ClientMetadata value.</p> </li> <li> <p>Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.</p> </li> </ul> </note>

Response

Success

ConfirmForgotPasswordResponse required

The response from the server that results from a user's request to retrieve a forgotten password.