MAPI Manual

NAME

FORGOTPASSWD

FUNCTION

When user forgets password, email or Sms reset link to user.

SYNOPSIS

action: FORGOTPASSWD
login_name_toreset
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

DESCRIPTION

This function is requested when users forget their password, sending the reset password link to them via Email or Sms. Both GET and POST methods can be used to perform the request.

Required Parameters

* action: specifies the requested function. Sets to FORGOTPASSWD.
* login_name_toreset: login name of the user who forgets his/her password. The login name must be an email address.
* check_channel: value is "sms" or "email". It specifies the channel through which the reset password link is sent. The default
  channel is email. If channel is set to "sms", the sms_content parameter must be provided; otherwise, email_content must be provided.   
* email_content: the email body. It must include "[%resetpasswd_checkcode%]" which will be replaced by a string of characters and
  numbers and will be used for authorisation purposes. 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.
* sms_content: body of the Sms text. It must include "[%resetpasswd_checkcode%]" which will be replaced by a string of characters and 
  numbers and will be used for authorisation purposes. 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.

* login_name: the default account used for signing up a new user.
* login_passwd: the password of the default account used for signing up a new user.

Optional Parameters

* email_subject: the email subject.
* from_email: email address of the sender. 
* sender_name: name of the sender of the email.
* email_cc: Cc field of the email. 
* email_bcc: Bcc field of the email. 
* from_mobile: name of the sender of the Sms.

RETURN DATA

For each valid request, the server provides a response in XML format. 
The response contains the following attribute:
* msg: a string indicating the email or sms has been sent successfully.

For an invalid request, the response XML contains the following attribute:
* msg: a string containing the error message. 

ROLE PERMITTED

EXAMPLES

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

Request:
http://app02.yvntech.com/MapIHttpS/MapIS?action=FORGOTPASSWD&login_name_toreset=name@example.com&check_channel=email&email_subject=forgotPassword&email_content=[%25resetpasswd_checkcode%25]&from_email=account@yvntech.com&sender_name=Mweb&login_name=account@yvntech.com&login_passwd=12345

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

TIPS

If check_channel is omitted, the default channel would be email.

ENVIRONMENT

AUTHOR

YVN Tech

SEE ALSO

RESETPASSWD, ADDSIGNUP

Mweb v2.0 YVNTECH 2014