Request password reset
curl --request POST \
--url https://{host}/v1/password-resets \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"type": "password-resets",
"attributes": {
"clientId": "9f2c1b7e-4d3a-4f61-9c8b-2e5a7d0f1b34",
"email": "jeffrey@example.test"
}
}
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
type: 'password-resets',
attributes: {
clientId: '9f2c1b7e-4d3a-4f61-9c8b-2e5a7d0f1b34',
email: 'jeffrey@example.test'
}
}
})
};
fetch('https://{host}/v1/password-resets', 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://{host}/v1/password-resets",
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([
'data' => [
'type' => 'password-resets',
'attributes' => [
'clientId' => '9f2c1b7e-4d3a-4f61-9c8b-2e5a7d0f1b34',
'email' => 'jeffrey@example.test'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/vnd.api+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://{host}/v1/password-resets"
payload = { "data": {
"type": "password-resets",
"attributes": {
"clientId": "9f2c1b7e-4d3a-4f61-9c8b-2e5a7d0f1b34",
"email": "jeffrey@example.test"
}
} }
headers = {"Content-Type": "application/vnd.api+json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"errors": [
{
"status": "404",
"code": "watch_reserved",
"title": "Not Found",
"detail": "<string>",
"meta": {},
"source": {
"pointer": "/data/attributes/reference",
"parameter": "<string>"
}
}
],
"jsonapi": {
"version": "1.0"
}
}{
"errors": [
{
"status": "404",
"code": "watch_reserved",
"title": "Not Found",
"detail": "<string>",
"meta": {},
"source": {
"pointer": "/data/attributes/reference",
"parameter": "<string>"
}
}
],
"jsonapi": {
"version": "1.0"
}
}Authentication
Request password reset
Scope: none — this happens before there is a token.
Sends the mail with the link. The answer is the same whether or not that address has an account: telling them apart would turn this into a way to find out who is a member, and the person who owns the address learns nothing either way.
The link works in a browser and its token works here, so somebody can finish in whichever they have open.
clientId is the app’s client: any other answers 403 client_may_not.
POST
/
v1
/
password-resets
Request password reset
curl --request POST \
--url https://{host}/v1/password-resets \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"type": "password-resets",
"attributes": {
"clientId": "9f2c1b7e-4d3a-4f61-9c8b-2e5a7d0f1b34",
"email": "jeffrey@example.test"
}
}
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
type: 'password-resets',
attributes: {
clientId: '9f2c1b7e-4d3a-4f61-9c8b-2e5a7d0f1b34',
email: 'jeffrey@example.test'
}
}
})
};
fetch('https://{host}/v1/password-resets', 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://{host}/v1/password-resets",
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([
'data' => [
'type' => 'password-resets',
'attributes' => [
'clientId' => '9f2c1b7e-4d3a-4f61-9c8b-2e5a7d0f1b34',
'email' => 'jeffrey@example.test'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/vnd.api+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://{host}/v1/password-resets"
payload = { "data": {
"type": "password-resets",
"attributes": {
"clientId": "9f2c1b7e-4d3a-4f61-9c8b-2e5a7d0f1b34",
"email": "jeffrey@example.test"
}
} }
headers = {"Content-Type": "application/vnd.api+json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"errors": [
{
"status": "404",
"code": "watch_reserved",
"title": "Not Found",
"detail": "<string>",
"meta": {},
"source": {
"pointer": "/data/attributes/reference",
"parameter": "<string>"
}
}
],
"jsonapi": {
"version": "1.0"
}
}{
"errors": [
{
"status": "404",
"code": "watch_reserved",
"title": "Not Found",
"detail": "<string>",
"meta": {},
"source": {
"pointer": "/data/attributes/reference",
"parameter": "<string>"
}
}
],
"jsonapi": {
"version": "1.0"
}
}