Reset password with token
curl --request POST \
--url https://api.sitespy.app/api/v1/auth/reset-password \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>",
"new_password": "newSecurePassword123"
}
'import requests
url = "https://api.sitespy.app/api/v1/auth/reset-password"
payload = {
"token": "<string>",
"new_password": "newSecurePassword123"
}
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({token: '<string>', new_password: 'newSecurePassword123'})
};
fetch('https://api.sitespy.app/api/v1/auth/reset-password', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "Password has been reset successfully"
}{
"error": "Invalid or expired reset token"
}Authentication
Reset password with token
Reset the user’s password using a valid reset token obtained from the forgot-password endpoint. Tokens expire after 1 hour.
POST
/
auth
/
reset-password
Reset password with token
curl --request POST \
--url https://api.sitespy.app/api/v1/auth/reset-password \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>",
"new_password": "newSecurePassword123"
}
'import requests
url = "https://api.sitespy.app/api/v1/auth/reset-password"
payload = {
"token": "<string>",
"new_password": "newSecurePassword123"
}
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({token: '<string>', new_password: 'newSecurePassword123'})
};
fetch('https://api.sitespy.app/api/v1/auth/reset-password', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "Password has been reset successfully"
}{
"error": "Invalid or expired reset token"
}
