Check a password-reset token
curl --request GET \
--url https://sandbox.circularo.com/api/v1/users/reset/checkimport requests
url = "https://sandbox.circularo.com/api/v1/users/reset/check"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox.circularo.com/api/v1/users/reset/check', 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://sandbox.circularo.com/api/v1/users/reset/check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.circularo.com/api/v1/users/reset/check"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.circularo.com/api/v1/users/reset/check")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/users/reset/check")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"email": "john.doe@example.com",
"expires": "2023-11-07T05:31:56Z",
"valid": true
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Users
Check a password-reset token
GET /users/reset/check
Tells whether a password-reset link can still be followed, and for which e-mail address it was issued. A reset form calls this before it lets somebody type a new password, so an expired link can be answered with “ask for a new one” rather than with a failure at the end.
A token that is recognised but no longer usable - already used, withdrawn, or older than the validity the instance allows - is answered as invalid, with the moment its validity ran out. A token that cannot be read at all, or names a reset that no longer exists, is refused instead.
No authorization: No authorization is required to call this endpoint.
Check a password-reset token
curl --request GET \
--url https://sandbox.circularo.com/api/v1/users/reset/checkimport requests
url = "https://sandbox.circularo.com/api/v1/users/reset/check"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox.circularo.com/api/v1/users/reset/check', 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://sandbox.circularo.com/api/v1/users/reset/check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.circularo.com/api/v1/users/reset/check"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.circularo.com/api/v1/users/reset/check")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/users/reset/check")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"email": "john.doe@example.com",
"expires": "2023-11-07T05:31:56Z",
"valid": true
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Query Parameters
Response
Returns whether the token can still be used, the e-mail address it was issued for and when it expires.