Use the Request Password Reset method to obtain a new password for a use. If the supplied email address matches an existing user account, an email will be sent giving the new password. The action returned gives the outcome of the request: either 'PasswordSent' if successful or 'InvalidEmail', 'NoAccountRegistered' or 'SendFailed' if not.
Request Schema
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="requestreset">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="email" type="xsd:string">
<xsd:annotation>
<xsd:documentation>The address associated with the user account to be reset</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Example Request
POST https://api.leaf.eco/r1/forgotpassword.eb HTTP/1.1
Accept: text/xml
Content-Type: text/xml; charset=utf-8
<?xml version="1.0" encoding="utf-8"?>
<requestreset>
<email>xsd:string</email>
</requestreset>
Response Schema
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="resetaction">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="action">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="PasswordSent">
<xsd:annotation>
<xsd:documentation>New password was sent</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="InvalidEmail">
<xsd:annotation>
<xsd:documentation>Invalid email address given</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="NoAccountRegistered">
<xsd:annotation>
<xsd:documentation>No account registered for the email address</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="SendFailed">
<xsd:annotation>
<xsd:documentation>Email could not be sent</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Example Response
HTTP/1.1 200 OK
Content-Type: text/xml
<?xml version="1.0" encoding="utf-8"?>
<resetaction>
<action>xsd:string</action>
</resetaction>
Example Request
POST https://api.leaf.eco/r1/forgotpassword.eb HTTP/1.1
Accept: application/json
Content-Type: application/json; charset=utf-8
{"email":String}
Example Response
HTTP/1.1 200 OK
Content-Type: application/json
{"action":String}