Confirm a password reset
curl --request POST \
--url https://api.simpl.gg/v1/auth/password-reset/confirm \
--header 'Content-Type: application/json' \
--data '
{
"token": "rst_9f2c4a1b",
"password": "a-brand-new-passphrase"
}
'import requests
url = "https://api.simpl.gg/v1/auth/password-reset/confirm"
payload = {
"token": "rst_9f2c4a1b",
"password": "a-brand-new-passphrase"
}
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: 'rst_9f2c4a1b', password: 'a-brand-new-passphrase'})
};
fetch('https://api.simpl.gg/v1/auth/password-reset/confirm', 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.simpl.gg/v1/auth/password-reset/confirm",
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' => 'rst_9f2c4a1b',
'password' => 'a-brand-new-passphrase'
]),
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.simpl.gg/v1/auth/password-reset/confirm"
payload := strings.NewReader("{\n \"token\": \"rst_9f2c4a1b\",\n \"password\": \"a-brand-new-passphrase\"\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.simpl.gg/v1/auth/password-reset/confirm")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"rst_9f2c4a1b\",\n \"password\": \"a-brand-new-passphrase\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.simpl.gg/v1/auth/password-reset/confirm")
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\": \"rst_9f2c4a1b\",\n \"password\": \"a-brand-new-passphrase\"\n}"
response = http.request(request)
puts response.read_bodyAuth
Confirm a password reset
Sets a new password using the emailed token. The token is single-use and
expires 15 minutes after issue: RESET_TOKEN_EXPIRED (1008) past that,
RESET_TOKEN_INVALID (1009) if it was already spent or never existed.
Every existing session for the account is invalidated on success, so a stolen token cannot outlive the reset.
POST
/
auth
/
password-reset
/
confirm
Confirm a password reset
curl --request POST \
--url https://api.simpl.gg/v1/auth/password-reset/confirm \
--header 'Content-Type: application/json' \
--data '
{
"token": "rst_9f2c4a1b",
"password": "a-brand-new-passphrase"
}
'import requests
url = "https://api.simpl.gg/v1/auth/password-reset/confirm"
payload = {
"token": "rst_9f2c4a1b",
"password": "a-brand-new-passphrase"
}
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: 'rst_9f2c4a1b', password: 'a-brand-new-passphrase'})
};
fetch('https://api.simpl.gg/v1/auth/password-reset/confirm', 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.simpl.gg/v1/auth/password-reset/confirm",
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' => 'rst_9f2c4a1b',
'password' => 'a-brand-new-passphrase'
]),
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.simpl.gg/v1/auth/password-reset/confirm"
payload := strings.NewReader("{\n \"token\": \"rst_9f2c4a1b\",\n \"password\": \"a-brand-new-passphrase\"\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.simpl.gg/v1/auth/password-reset/confirm")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"rst_9f2c4a1b\",\n \"password\": \"a-brand-new-passphrase\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.simpl.gg/v1/auth/password-reset/confirm")
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\": \"rst_9f2c4a1b\",\n \"password\": \"a-brand-new-passphrase\"\n}"
response = http.request(request)
puts response.read_bodyBody
application/json
Completes a password reset. The token is valid for 15 minutes from issue and is single-use. All existing sessions for the account are invalidated on success.
Response
Password changed. Log in again to get a new session.