Authentication
Confirm password reset with tokens
Resets password using the accessToken and refreshToken from the URL hash fragment. Both tokens are required. Rejections are distinguished by code: SAME_PASSWORD when the new password equals the current one, WEAK_PASSWORD when it fails the password policy, INVALID_RESET_TOKEN when the recovery tokens are invalid or expired.
POST
/
v1
/
auth
/
confirm-password-reset
Confirm password reset with tokens
curl --request POST \
--url https://api.hyperprop.com/platform/v1/auth/confirm-password-reset \
--header 'Content-Type: application/json' \
--data '
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refreshToken": "7c45zg7nnd74",
"newPassword": "NewSecurePass456!"
}
'import requests
url = "https://api.hyperprop.com/platform/v1/auth/confirm-password-reset"
payload = {
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refreshToken": "7c45zg7nnd74",
"newPassword": "NewSecurePass456!"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
refreshToken: '7c45zg7nnd74',
newPassword: 'NewSecurePass456!'
})
};
fetch('https://api.hyperprop.com/platform/v1/auth/confirm-password-reset', 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://api.hyperprop.com/platform/v1/auth/confirm-password-reset",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accessToken' => 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
'refreshToken' => '7c45zg7nnd74',
'newPassword' => 'NewSecurePass456!'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://api.hyperprop.com/platform/v1/auth/confirm-password-reset"
payload := strings.NewReader("{\n \"accessToken\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n \"refreshToken\": \"7c45zg7nnd74\",\n \"newPassword\": \"NewSecurePass456!\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hyperprop.com/platform/v1/auth/confirm-password-reset")
.header("Content-Type", "application/json")
.body("{\n \"accessToken\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n \"refreshToken\": \"7c45zg7nnd74\",\n \"newPassword\": \"NewSecurePass456!\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/auth/confirm-password-reset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"accessToken\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n \"refreshToken\": \"7c45zg7nnd74\",\n \"newPassword\": \"NewSecurePass456!\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Password reset successfully. You can now sign in with your new password."
}{
"statusCode": 400,
"error": "Bad Request",
"message": "Your new password must be different from your current password",
"code": "SAME_PASSWORD"
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}Body
application/json
Related topics
Request password reset emailSign in with email and passwordGenerate a new temporary password for a team memberIntroductionSign up a new user⌘I
Confirm password reset with tokens
curl --request POST \
--url https://api.hyperprop.com/platform/v1/auth/confirm-password-reset \
--header 'Content-Type: application/json' \
--data '
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refreshToken": "7c45zg7nnd74",
"newPassword": "NewSecurePass456!"
}
'import requests
url = "https://api.hyperprop.com/platform/v1/auth/confirm-password-reset"
payload = {
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refreshToken": "7c45zg7nnd74",
"newPassword": "NewSecurePass456!"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
refreshToken: '7c45zg7nnd74',
newPassword: 'NewSecurePass456!'
})
};
fetch('https://api.hyperprop.com/platform/v1/auth/confirm-password-reset', 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://api.hyperprop.com/platform/v1/auth/confirm-password-reset",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accessToken' => 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
'refreshToken' => '7c45zg7nnd74',
'newPassword' => 'NewSecurePass456!'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://api.hyperprop.com/platform/v1/auth/confirm-password-reset"
payload := strings.NewReader("{\n \"accessToken\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n \"refreshToken\": \"7c45zg7nnd74\",\n \"newPassword\": \"NewSecurePass456!\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hyperprop.com/platform/v1/auth/confirm-password-reset")
.header("Content-Type", "application/json")
.body("{\n \"accessToken\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n \"refreshToken\": \"7c45zg7nnd74\",\n \"newPassword\": \"NewSecurePass456!\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/auth/confirm-password-reset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"accessToken\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n \"refreshToken\": \"7c45zg7nnd74\",\n \"newPassword\": \"NewSecurePass456!\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Password reset successfully. You can now sign in with your new password."
}{
"statusCode": 400,
"error": "Bad Request",
"message": "Your new password must be different from your current password",
"code": "SAME_PASSWORD"
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}