Check identifiers
curl --request POST \
--url http://localhost:3051/api/v1/registry/check \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"identifiers": [
{
"type": "email",
"sha256": "<string>"
}
]
}
'import requests
url = "http://localhost:3051/api/v1/registry/check"
payload = { "identifiers": [
{
"type": "email",
"sha256": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({identifiers: [{type: 'email', sha256: '<string>'}]})
};
fetch('http://localhost:3051/api/v1/registry/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_PORT => "3051",
CURLOPT_URL => "http://localhost:3051/api/v1/registry/check",
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([
'identifiers' => [
[
'type' => 'email',
'sha256' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "http://localhost:3051/api/v1/registry/check"
payload := strings.NewReader("{\n \"identifiers\": [\n {\n \"type\": \"email\",\n \"sha256\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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:3051/api/v1/registry/check")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"identifiers\": [\n {\n \"type\": \"email\",\n \"sha256\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3051/api/v1/registry/check")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"identifiers\": [\n {\n \"type\": \"email\",\n \"sha256\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"match": true,
"signals": [
{
"category": "payment_fraud",
"reporter_count": 123,
"first_reported_at": "2023-11-07T05:31:56Z",
"last_reported_at": "2023-11-07T05:31:56Z",
"automated_refusal_permitted": true
}
],
"normalisation_version": 123
}Shared Registry
Check identifiers
Check up to five hashed identifiers for one user (for example a primary and a recovery email) against the Shared Registry. Returns one signal per category that other members reported, never who reported it. Each call counts against your daily check quota.
POST
/
api
/
v1
/
registry
/
check
Check identifiers
curl --request POST \
--url http://localhost:3051/api/v1/registry/check \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"identifiers": [
{
"type": "email",
"sha256": "<string>"
}
]
}
'import requests
url = "http://localhost:3051/api/v1/registry/check"
payload = { "identifiers": [
{
"type": "email",
"sha256": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({identifiers: [{type: 'email', sha256: '<string>'}]})
};
fetch('http://localhost:3051/api/v1/registry/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_PORT => "3051",
CURLOPT_URL => "http://localhost:3051/api/v1/registry/check",
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([
'identifiers' => [
[
'type' => 'email',
'sha256' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "http://localhost:3051/api/v1/registry/check"
payload := strings.NewReader("{\n \"identifiers\": [\n {\n \"type\": \"email\",\n \"sha256\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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:3051/api/v1/registry/check")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"identifiers\": [\n {\n \"type\": \"email\",\n \"sha256\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3051/api/v1/registry/check")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"identifiers\": [\n {\n \"type\": \"email\",\n \"sha256\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"match": true,
"signals": [
{
"category": "payment_fraud",
"reporter_count": 123,
"first_reported_at": "2023-11-07T05:31:56Z",
"last_reported_at": "2023-11-07T05:31:56Z",
"automated_refusal_permitted": true
}
],
"normalisation_version": 123
}Check up to five hashed emails for one user against the Shared Registry. Hash each email with the published rules first. To act on the result, see Check a sign-up.
Authorizations
API key from the Omnifence dashboard
Body
application/json