Prove control of a domain
curl --request POST \
--url https://app.trustivan.com/api/v1/identity/domains/{id}/verify \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/identity/domains/{id}/verify"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/identity/domains/{id}/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/identity/domains/{id}/verify"
req, _ := http.NewRequest("POST", 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))
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Prove control of a domain
Checks DNS for a TXT record carrying this claim’s token.
DNS rather than an emailed link, because the claim being proved is control of a DOMAIN and not of one mailbox in it: an alias like admin@ is readable by several teams in a large company, and is exactly what an attacker already has in a compromised one.
Idempotent: re-verifying an already-proven domain succeeds.
POST
/
identity
/
domains
/
{id}
/
verify
Prove control of a domain
curl --request POST \
--url https://app.trustivan.com/api/v1/identity/domains/{id}/verify \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/identity/domains/{id}/verify"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/identity/domains/{id}/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/identity/domains/{id}/verify"
req, _ := http.NewRequest("POST", 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))
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Authorizations
Response
Verified.