Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . cognito-idp ]

forgot-password

Description

Calling this API causes a message to be sent to the end user with a confirmation code that is required to change the user's password. For the Username parameter, you can use the username or user alias. If a verified phone number exists for the user, the confirmation code is sent to the phone number. Otherwise, if a verified email exists, the confirmation code is sent to the email. If neither a verified phone number nor a verified email exists, InvalidParameterException is thrown. To use the confirmation code for resetting the password, call .

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  forgot-password
--client-id <value>
[--secret-hash <value>]
[--user-context-data <value>]
--username <value>
[--analytics-metadata <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--client-id (string)

The ID of the client associated with the user pool.

--secret-hash (string)

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.

--user-context-data (structure)

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

Shorthand Syntax:

EncodedData=string

JSON Syntax:

{
  "EncodedData": "string"
}

--username (string)

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

--analytics-metadata (structure)

The Amazon Pinpoint analytics metadata for collecting metrics for forgot-password calls.

Shorthand Syntax:

AnalyticsEndpointId=string

JSON Syntax:

{
  "AnalyticsEndpointId": "string"
}

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Output

CodeDeliveryDetails -> (structure)

The code delivery details returned by the server in response to the request to reset a password.

Destination -> (string)

The destination for the code delivery details.

DeliveryMedium -> (string)

The delivery medium (email message or phone number).

AttributeName -> (string)

The attribute name.