Reset Password

You can reset the password of a registered user’s account using the following code snippet. While calling the reset_password() method, a reset password link will be generated and sent to the user’s email address.

Note:
  • The email_id, platform_type, and zaid are mandatory attributes.

  • You can configure the sender’s email address, subject and the email message. You must add the email address in the Catalyst Mail Component and get it verified before using it in the SDK code.

Create a Dictionary

You will need to create a dictionary that contains the registration details of a particular user as given below. You can then pass the configured dictionary to the method that handles the password reset process.

    
copy
#Create a dictionary reset_config = { "platform_type": "web", "zaid": "1008807534", "template_details": { "senders_mail": "dogogetu@tutuapp.bid", "subject": "Welcome to %APP_NAME%", "message": "Hello , Follow this link to join in %APP_NAME% . %LINK%If you didnt ask to join the application, you can ignore this email.Thanks, Your %APP_NAME% team", }, }

Reset the Password

The objects that contains the user information and user signup configuration are passed as arguments to the reset_password() method which returns a response.

To know more about the component instance authentication_service used below, please refer to this section.

Parameters Used

Parameter Name Data Type Definition
email_id String A Mandatory parameter. Will hold the value of the the user's email address.
reset_config Object A Mandatory parameter. Will store the details of the user account for which the password needs to be reset. These details include the application platform type, the ZAID, and the email information to be sent after the password reset.
    
copy
# Reset user password authentication_service = app.authentication() response_data = authentication_service.reset_password( "amelia.burrows@zylker.com", reset_config )

A sample response is shown below :

    
copy
"Reset link sent to amelia.burrows@zylker.com. Please check your email".
Info : Refer to the SDK Scopes table to determine the required permission level for performing the above operation.

Last Updated 2025-03-28 18:24:49 +0530 +0530

ON THIS PAGE
ACCESS THIS PAGE