Verify SSO connection domain
/sso-connection/{id}/domains/{domain}/verify
Check the DNS TXT challenge for a domain and mark it verified if the expected truto-domain-verification=<verification_token> record is found. Returns the outcome; on failure, detail explains what was missing. Verification is required before "Sign in with SSO" can resolve a connection by email domain.
Path Parameters
The ID of the SSO connection the domain belongs to.
1ba1f401-7183-47c5-9e39-e8e257e3c795The email domain to verify.
example.comResponse Body
Present only when verification did not pass; explains why.
Expected TXT record "truto-domain-verification=..." was not found on example.com.example.comtrueErrors
| Status | Description |
|---|---|
403 | Forbidden if the user is not an admin of the connection's team. API tokens are never team admins, so they always get 403. |
404 | Not found if no SSO connection with that ID, or the domain is not on the connection |
curl -X POST 'https://api.truto.one/sso-connection/{id}/domains/{domain}/verify' \
-H 'Authorization: Bearer <your_api_token>' \
-H 'Content-Type: application/json'const response = await fetch('https://api.truto.one/sso-connection/{id}/domains/{domain}/verify', {
method: 'POST',
headers: {
'Authorization': 'Bearer <your_api_token>',
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);import requests
url = "https://api.truto.one/sso-connection/{id}/domains/{domain}/verify"
headers = {
"Authorization": "Bearer <your_api_token>",
"Content-Type": "application/json",
}
params = {
}
response = requests.post(url, headers=headers, params=params)
print(response.json())