Set a new password using a reset key
curl --request POST \
--url 'https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_reset_password' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data action=sagescreen_reset_password \
--data 'reset_password_nonce=<string>' \
--data 'recaptcha_token=<string>' \
--data 'reset_key=<string>' \
--data 'login=<string>' \
--data 'new_password=<string>' \
--data 'confirm_password=<string>'import requests
url = "https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_reset_password"
payload = {
"action": "sagescreen_reset_password",
"reset_password_nonce": "<string>",
"recaptcha_token": "<string>",
"reset_key": "<string>",
"login": "<string>",
"new_password": "<string>",
"confirm_password": "<string>"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
action: 'sagescreen_reset_password',
reset_password_nonce: '<string>',
recaptcha_token: '<string>',
reset_key: '<string>',
login: '<string>',
new_password: '<string>',
confirm_password: '<string>'
})
};
fetch('https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_reset_password', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_reset_password",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "action=sagescreen_reset_password&reset_password_nonce=%3Cstring%3E&recaptcha_token=%3Cstring%3E&reset_key=%3Cstring%3E&login=%3Cstring%3E&new_password=%3Cstring%3E&confirm_password=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_reset_password"
payload := strings.NewReader("action=sagescreen_reset_password&reset_password_nonce=%3Cstring%3E&recaptcha_token=%3Cstring%3E&reset_key=%3Cstring%3E&login=%3Cstring%3E&new_password=%3Cstring%3E&confirm_password=%3Cstring%3E")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_reset_password")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("action=sagescreen_reset_password&reset_password_nonce=%3Cstring%3E&recaptcha_token=%3Cstring%3E&reset_key=%3Cstring%3E&login=%3Cstring%3E&new_password=%3Cstring%3E&confirm_password=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_reset_password")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "action=sagescreen_reset_password&reset_password_nonce=%3Cstring%3E&recaptcha_token=%3Cstring%3E&reset_key=%3Cstring%3E&login=%3Cstring%3E&new_password=%3Cstring%3E&confirm_password=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"message": "Password reset successfully"
}
}Auth – AJAX
Set a new password using a reset key
Completes the password-reset flow. The reset_key and login
are validated via check_password_reset_key(). On success the
password is updated and a confirmation email is sent.
Registered as wp_ajax_nopriv_sagescreen_reset_password — public.
POST
/
wp-admin
/
admin-ajax.php?action=sagescreen_reset_password
Set a new password using a reset key
curl --request POST \
--url 'https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_reset_password' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data action=sagescreen_reset_password \
--data 'reset_password_nonce=<string>' \
--data 'recaptcha_token=<string>' \
--data 'reset_key=<string>' \
--data 'login=<string>' \
--data 'new_password=<string>' \
--data 'confirm_password=<string>'import requests
url = "https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_reset_password"
payload = {
"action": "sagescreen_reset_password",
"reset_password_nonce": "<string>",
"recaptcha_token": "<string>",
"reset_key": "<string>",
"login": "<string>",
"new_password": "<string>",
"confirm_password": "<string>"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
action: 'sagescreen_reset_password',
reset_password_nonce: '<string>',
recaptcha_token: '<string>',
reset_key: '<string>',
login: '<string>',
new_password: '<string>',
confirm_password: '<string>'
})
};
fetch('https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_reset_password', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_reset_password",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "action=sagescreen_reset_password&reset_password_nonce=%3Cstring%3E&recaptcha_token=%3Cstring%3E&reset_key=%3Cstring%3E&login=%3Cstring%3E&new_password=%3Cstring%3E&confirm_password=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_reset_password"
payload := strings.NewReader("action=sagescreen_reset_password&reset_password_nonce=%3Cstring%3E&recaptcha_token=%3Cstring%3E&reset_key=%3Cstring%3E&login=%3Cstring%3E&new_password=%3Cstring%3E&confirm_password=%3Cstring%3E")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_reset_password")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("action=sagescreen_reset_password&reset_password_nonce=%3Cstring%3E&recaptcha_token=%3Cstring%3E&reset_key=%3Cstring%3E&login=%3Cstring%3E&new_password=%3Cstring%3E&confirm_password=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_reset_password")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "action=sagescreen_reset_password&reset_password_nonce=%3Cstring%3E&recaptcha_token=%3Cstring%3E&reset_key=%3Cstring%3E&login=%3Cstring%3E&new_password=%3Cstring%3E&confirm_password=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"message": "Password reset successfully"
}
}Body
application/x-www-form-urlencoded
Allowed value:
"sagescreen_reset_password"WP nonce for sagescreen_reset_password
Turnstile / reCAPTCHA token (action reset_password)
Password reset key from the email link
Example:
"abc123def456"
Username or email address
Example:
"john.doe"
Minimum string length:
8Example:
"NewSecurePass456"
Must match new_password
Example:
"NewSecurePass456"
⌘I