Reset Password
curl --request POST \
--url https://api.replyke.com/api/v6/:projectId/api/v7/auth/reset-password \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>",
"newPassword": "<string>"
}
'import requests
url = "https://api.replyke.com/api/v6/:projectId/api/v7/auth/reset-password"
payload = {
"token": "<string>",
"newPassword": "<string>"
}
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>', newPassword: '<string>'})
};
fetch('https://api.replyke.com/api/v6/:projectId/api/v7/auth/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://api.replyke.com/api/v6/:projectId/api/v7/auth/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 => json_encode([
'token' => '<string>',
'newPassword' => '<string>'
]),
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.replyke.com/api/v6/:projectId/api/v7/auth/reset-password"
payload := strings.NewReader("{\n \"token\": \"<string>\",\n \"newPassword\": \"<string>\"\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.replyke.com/api/v6/:projectId/api/v7/auth/reset-password")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"<string>\",\n \"newPassword\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replyke.com/api/v6/:projectId/api/v7/auth/reset-password")
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 \"token\": \"<string>\",\n \"newPassword\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>"
}Auth Endpoints
Reset Password
Reset a user’s password using a token from the reset email
POST
/
:projectId
/
api
/
v7
/
auth
/
reset-password
Reset Password
curl --request POST \
--url https://api.replyke.com/api/v6/:projectId/api/v7/auth/reset-password \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>",
"newPassword": "<string>"
}
'import requests
url = "https://api.replyke.com/api/v6/:projectId/api/v7/auth/reset-password"
payload = {
"token": "<string>",
"newPassword": "<string>"
}
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>', newPassword: '<string>'})
};
fetch('https://api.replyke.com/api/v6/:projectId/api/v7/auth/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://api.replyke.com/api/v6/:projectId/api/v7/auth/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 => json_encode([
'token' => '<string>',
'newPassword' => '<string>'
]),
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.replyke.com/api/v6/:projectId/api/v7/auth/reset-password"
payload := strings.NewReader("{\n \"token\": \"<string>\",\n \"newPassword\": \"<string>\"\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.replyke.com/api/v6/:projectId/api/v7/auth/reset-password")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"<string>\",\n \"newPassword\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replyke.com/api/v6/:projectId/api/v7/auth/reset-password")
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 \"token\": \"<string>\",\n \"newPassword\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>"
}Sets a new password for a user by validating a reset token received via email. On success, all existing refresh tokens for the user are invalidated, forcing re-authentication.
Returned when the token does not match any user record or the token has
expired (1 hour TTL).
Body Parameters
string
required
The raw reset token from the password reset email link. The server hashes
this token internally before comparing it to the stored hash.
string
required
The new password to set.
Response
boolean
true on success.string
Confirmation message:
"Password has been reset successfully."Error Responses
Invalid or Expired Token — 400
Invalid or Expired Token — 400
{
"error": "Invalid or expired password reset token.",
"code": "auth/invalid-reset-token"
}
All active sessions for the user are revoked when the password is reset.
The user must sign in again after resetting their password.
See Also
⌘I

