4.1.21 Forgot password
URL: /pf.ashx
The method allows you to change the password in case it was forgotten.
This method works only if the email is assigned to the account.
Parameters | Description |
---|---|
un(optional) | username- login of SIP account |
em(required) | email- email address assigned to the account |
This method requires smtp details filled and forgot password template with other settings that can be found in “Mail settings - Forgot password” section in EMCD AppSettings.config file.
<!-- Mail settings - Forgot password -->
<add key="forgot_password_mail_subject" value="Forgot password" />
<add key="forgot_password_mail_body_file" value="/var/www/emcd/mail/forgot_password_reset.html" />
<add key="forgot_password_mail_body_html" value="true" />
<add key="forgot_password_mail_display_name" value="noreply@xxxxxx.com" />
<add key="forgot_password_mail_bcc" value="" />
<add key="forgot_password_mail_reply_to" value="noreply@xxxxxx.com" />
Email template should contain a link pointing to VUP portal :
https://xxxxxxxx/vup/forgot-password?type=dialer&token=[CODE]
With additional information on why this email was sent.
cURL Request Examples
curl --location --request POST 'https://xxxxxxxx/emcd/fp.ashx?un=piotr2&em=piotrios4%40niepodam.pl' \
--header 'User-Agent: vippie;ios;1.2.3' \
--header 'Content-Type: text/plain' \
--header 'Authorization: Basic YW5kOmFuZDJhMzJkaW0=' \
OR with empty un:
curl --location --request POST 'https://xxxxxxxx/emcd/fp.ashx?un=&em=piotrios4%40niepodam.pl' \
--header 'User-Agent: vippie;ios;1.2.3' \
--header 'Content-Type: text/plain' \
--header 'Authorization: Basic YW5kOmFuZDJhMzJkaW0=' \
Possible Responses
Code | Description |
---|---|
200 | OK – The email was sent successfully. The app should display a popup informing the user that they will receive an email with a link to reset their password. |
400 | Incorrect parameters - one of the parameters was not provided |
405 | Server side error |
410 | Invalid email format |
500 | Internal server error |
Additional Notes
The request must be authenticated using Basic Auth.
If both
un
andem
are empty, the request will fail with a400
error.The email address must be correctly formatted; otherwise, a
410
error will be returned.