By submitting an email address via POST to this endpoint an email will be sent to the email with a temporary link to reset a POOL account password.
Example JSON Output:
{
"reset_email": "sent"
}
- OR -
{
"result": "fail",
"message": "mail.send() failed due to incorrect configuration."
}
PHP (using cURL):
<?php
$post_fields = "email=test@promoonly.com";
$userid_url = "https://api.promoonly.com/password/reset";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $userid_url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$userid_result = curl_exec($ch);
curl_close($ch);
$userid_obj = json_decode($userid_result);
?>
Javascript (using jQuery):
$.ajax({
type: "POST",
url: "https://api.promoonly.com/password/reset",
data: { email: "test@promoonly.com" },
dataType: "json",
success: function (data)
{
console.log(data);
}
});
Python (using requests):
#!/usr/bin/env python
import requests
import urllib
user_data = { "email": "test@promoonly.com" }
userid_url = "https://api.promoonly.com/password/reset"
userid_result = requests.post(userid_url, data=user_data)
print(userid_result.text)