Reset user password
curl --request POST \
--url http://localhost:7701/api/v1/auth/reset-password \
--header 'Content-Type: application/json' \
--header 'x-client-id: <x-client-id>' \
--data '
{
"token": "a1b2c3d4e5f6...",
"password": "newSecret123",
"password_confirmation": "newSecret123"
}
'import requests
url = "http://localhost:7701/api/v1/auth/reset-password"
payload = {
"token": "a1b2c3d4e5f6...",
"password": "newSecret123",
"password_confirmation": "newSecret123"
}
headers = {
"x-client-id": "<x-client-id>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-client-id': '<x-client-id>', 'Content-Type': 'application/json'},
body: JSON.stringify({
token: 'a1b2c3d4e5f6...',
password: 'newSecret123',
password_confirmation: 'newSecret123'
})
};
fetch('http://localhost:7701/api/v1/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_PORT => "7701",
CURLOPT_URL => "http://localhost:7701/api/v1/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' => 'a1b2c3d4e5f6...',
'password' => 'newSecret123',
'password_confirmation' => 'newSecret123'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-client-id: <x-client-id>"
],
]);
$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 := "http://localhost:7701/api/v1/auth/reset-password"
payload := strings.NewReader("{\n \"token\": \"a1b2c3d4e5f6...\",\n \"password\": \"newSecret123\",\n \"password_confirmation\": \"newSecret123\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-client-id", "<x-client-id>")
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("http://localhost:7701/api/v1/auth/reset-password")
.header("x-client-id", "<x-client-id>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"a1b2c3d4e5f6...\",\n \"password\": \"newSecret123\",\n \"password_confirmation\": \"newSecret123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:7701/api/v1/auth/reset-password")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["x-client-id"] = '<x-client-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"a1b2c3d4e5f6...\",\n \"password\": \"newSecret123\",\n \"password_confirmation\": \"newSecret123\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Password reset successfully."
}Auth
Reset user password
Consumes a one-time reset token and updates the user’s password.
POST
/
api
/
v1
/
auth
/
reset-password
Reset user password
curl --request POST \
--url http://localhost:7701/api/v1/auth/reset-password \
--header 'Content-Type: application/json' \
--header 'x-client-id: <x-client-id>' \
--data '
{
"token": "a1b2c3d4e5f6...",
"password": "newSecret123",
"password_confirmation": "newSecret123"
}
'import requests
url = "http://localhost:7701/api/v1/auth/reset-password"
payload = {
"token": "a1b2c3d4e5f6...",
"password": "newSecret123",
"password_confirmation": "newSecret123"
}
headers = {
"x-client-id": "<x-client-id>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-client-id': '<x-client-id>', 'Content-Type': 'application/json'},
body: JSON.stringify({
token: 'a1b2c3d4e5f6...',
password: 'newSecret123',
password_confirmation: 'newSecret123'
})
};
fetch('http://localhost:7701/api/v1/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_PORT => "7701",
CURLOPT_URL => "http://localhost:7701/api/v1/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' => 'a1b2c3d4e5f6...',
'password' => 'newSecret123',
'password_confirmation' => 'newSecret123'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-client-id: <x-client-id>"
],
]);
$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 := "http://localhost:7701/api/v1/auth/reset-password"
payload := strings.NewReader("{\n \"token\": \"a1b2c3d4e5f6...\",\n \"password\": \"newSecret123\",\n \"password_confirmation\": \"newSecret123\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-client-id", "<x-client-id>")
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("http://localhost:7701/api/v1/auth/reset-password")
.header("x-client-id", "<x-client-id>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"a1b2c3d4e5f6...\",\n \"password\": \"newSecret123\",\n \"password_confirmation\": \"newSecret123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:7701/api/v1/auth/reset-password")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["x-client-id"] = '<x-client-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"a1b2c3d4e5f6...\",\n \"password\": \"newSecret123\",\n \"password_confirmation\": \"newSecret123\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Password reset successfully."
}Headers
Client identifier for the company in the request.
Example:
"client_abc123"
Body
application/json
Response
Password reset successfully
Example:
"Password reset successfully."