Verify an SSO connection's domains
curl --request POST \
--url https://api.openworklabs.com/v1/sso/connections/{connectionId}/verify-domain \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.openworklabs.com/v1/sso/connections/{connectionId}/verify-domain"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.openworklabs.com/v1/sso/connections/{connectionId}/verify-domain', 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.openworklabs.com/v1/sso/connections/{connectionId}/verify-domain",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.openworklabs.com/v1/sso/connections/{connectionId}/verify-domain"
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))
}HttpResponse<String> response = Unirest.post("https://api.openworklabs.com/v1/sso/connections/{connectionId}/verify-domain")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/sso/connections/{connectionId}/verify-domain")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"error": "invalid_request",
"details": [
{
"message": "<string>",
"path": [
"<string>"
]
}
]
}{
"error": "unauthorized"
}{
"error": "enterprise_plan_required",
"feature": "<string>",
"message": "<string>"
}{
"error": "forbidden",
"message": "<string>",
"reason": "<string>"
}{
"error": "organization_not_found",
"feature": "<string>"
}{
"error": "sso_domain_not_verified",
"reason": "not_verified",
"message": "<string>",
"domains": [
{
"domain": "<string>",
"status": "verified",
"dnsName": "<string>",
"publishedName": "<string>",
"message": "<string>"
}
],
"domainVerificationToken": "<string>",
"domainVerificationExpiresAt": "2023-11-07T05:31:56Z"
}{
"error": "rate_limited",
"message": "<string>",
"retryAfterSeconds": 0
}SSO
Verify an SSO connection's domains
Checks the DNS TXT record of every domain one SSO connection by id lists and marks them verified when all carry its current verification value. Otherwise answers 409 with what was found for each domain, or with a new value when the last one expired.
POST
/
v1
/
sso
/
connections
/
{connectionId}
/
verify-domain
Verify an SSO connection's domains
curl --request POST \
--url https://api.openworklabs.com/v1/sso/connections/{connectionId}/verify-domain \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.openworklabs.com/v1/sso/connections/{connectionId}/verify-domain"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.openworklabs.com/v1/sso/connections/{connectionId}/verify-domain', 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.openworklabs.com/v1/sso/connections/{connectionId}/verify-domain",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.openworklabs.com/v1/sso/connections/{connectionId}/verify-domain"
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))
}HttpResponse<String> response = Unirest.post("https://api.openworklabs.com/v1/sso/connections/{connectionId}/verify-domain")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/sso/connections/{connectionId}/verify-domain")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"error": "invalid_request",
"details": [
{
"message": "<string>",
"path": [
"<string>"
]
}
]
}{
"error": "unauthorized"
}{
"error": "enterprise_plan_required",
"feature": "<string>",
"message": "<string>"
}{
"error": "forbidden",
"message": "<string>",
"reason": "<string>"
}{
"error": "organization_not_found",
"feature": "<string>"
}{
"error": "sso_domain_not_verified",
"reason": "not_verified",
"message": "<string>",
"domains": [
{
"domain": "<string>",
"status": "verified",
"dnsName": "<string>",
"publishedName": "<string>",
"message": "<string>"
}
],
"domainVerificationToken": "<string>",
"domainVerificationExpiresAt": "2023-11-07T05:31:56Z"
}{
"error": "rate_limited",
"message": "<string>",
"retryAfterSeconds": 0
}Was this page helpful?