Allowed recipients
Get an allowed recipient
Returns an allowed recipient. While pending, it checks for the verification email and explains why the latest one didn’t count. Poll it after sending the email.
GET
/
api
/
allowed-recipients
/
{id}
Get an allowed recipient
curl --request GET \
--url https://api.empirical.run/api/allowed-recipients/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.empirical.run/api/allowed-recipients/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.empirical.run/api/allowed-recipients/{id}', 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.empirical.run/api/allowed-recipients/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.empirical.run/api/allowed-recipients/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.empirical.run/api/allowed-recipients/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.empirical.run/api/allowed-recipients/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"recipient": {
"id": 123,
"kind": "domain",
"value": "<string>",
"status": "pending",
"verification_address": "<string>",
"verification_code": "<string>",
"expires_at": "<string>",
"code_expires_at": "<string>",
"verified_at": "<string>",
"verified_via": "email",
"verified_by": "<string>",
"last_rejection": "<string>",
"created_at": "<string>"
}
}
}{
"data": "<unknown>",
"error": {
"message": "<string>"
}
}Was this page helpful?
Get an allowed recipient
curl --request GET \
--url https://api.empirical.run/api/allowed-recipients/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.empirical.run/api/allowed-recipients/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.empirical.run/api/allowed-recipients/{id}', 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.empirical.run/api/allowed-recipients/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.empirical.run/api/allowed-recipients/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.empirical.run/api/allowed-recipients/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.empirical.run/api/allowed-recipients/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"recipient": {
"id": 123,
"kind": "domain",
"value": "<string>",
"status": "pending",
"verification_address": "<string>",
"verification_code": "<string>",
"expires_at": "<string>",
"code_expires_at": "<string>",
"verified_at": "<string>",
"verified_via": "email",
"verified_by": "<string>",
"last_rejection": "<string>",
"created_at": "<string>"
}
}
}{
"data": "<unknown>",
"error": {
"message": "<string>"
}
}