MAPI Manual

NAME

RESETPASSWD_BYCODE

FUNCTION

User reset password

SYNOPSIS

action: RESETPASSWD_BYCODE

login_name_toreset

new_passwd
new_passwd_repeat
resetpasswd_checkcode
check_channel: sms/email
<!--------- If check_channel = email ---------->
email_subject
email_content
from_email
sender_name
email_cc
email_bcc
<!--------- If check_channel = sms ------------->
sms_content
from_mobile 

login_name
login_passwd
or  
login_name
session_id
or  
device_id

DESCRIPTION

This function allows users to reset their passwords, with the option of sending notifications to them via email or sms.

Required Parameters

* action: RESETPASSWD_BYCODE.
* login_name_toreset: login name of the user. The login name must be an email address.
* new_passwd: specifies the new password.
* new_passwd_repeat: confirmation of the new password.
* resetpasswd_checkcode: specifies the check code for authorization purposes. It consists of a string of characters and numbers. The value of this field can be obtained via the FORGOTPASSWD request.

* login_name: the username provided for login.
* login_passwd: the password for login.
or
* login_name: the username provided for login.
* session_id: the session ID assigned by the system.
or
* device_id: a unique ID of the device. The system can use it as a key to identify users.

Optional Parameters

* check_channel: value is "sms" or "email". It specifies the channel through which the notification is sent. If this parameter is omitted, sending notifications is disabled. If email is selected, the email_content parameter must be provided; otherwise, sms_content must be provided.
* email_subject: the email subject.
* email_content: the email body. It can include "[%first_name%]" and "[%last_name%]" which will be replaced by the user's firstname and lastname respectively. Special characters must be URL encoded. This parameter is required for email.
* from_email: the sender's email address.
* sender_name: name of the sender of the email.
* email_cc: Cc field of the email. 
* email_bcc: Bcc field of the email.
* sms_content: body of the sms. It can include [%first_name%] and [%last_name%] which will be replaced by the user's firstname and lastname respectively. Special characters must be URL encoded. This parameter is required for Sms.
* from_mobile: name of the sender of the Sms.

RETURN DATA

The response contains the following attribute:
* msg: a string indicating the password has been reset successfully.

ROLE PERMITTED

All roles

EXAMPLES

The following example shows a successful HTTP GET request and response with check_channel set to sms.

Request:

http://app02.yvntech.com/MapIHttpS/MapIS?action=RESETPASSWD_BYCODE&login_name_toreset=name@example.com&new_passwd=helloworld&new_passwd_repeat=helloworld&resetpasswd_checkcode=4e945486417a27d687d668c4e587551c323031332D30392D30392030363A33333A3237&check_channel=sms&sms_content=YourPasswordHasBeenReset&from_mobile=YVN&device_id=mytestid

Response:

<result tftype='1' infotype='0'>
    <field name='msg'>SUCCESS</field>
</result>

TIPS

If check_channel is omitted, sending notifications will be disabled.

ENVIRONMENT

AUTHOR

YVN Tech

SEE ALSO

FORGOTPASSWD

Mweb v2.0 YVNTECH 2014