Get CAPTCHA attack protection policies
curl --request GET \
--url https://{tenantDomain}/api/v2/attack-protection/captcha/policies \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenantDomain}/api/v2/attack-protection/captcha/policies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenantDomain}/api/v2/attack-protection/captcha/policies', 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://{tenantDomain}/api/v2/attack-protection/captcha/policies",
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://{tenantDomain}/api/v2/attack-protection/captcha/policies"
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://{tenantDomain}/api/v2/attack-protection/captcha/policies")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/attack-protection/captcha/policies")
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[
{
"id": "<string>",
"name": "<string>",
"priority": 2,
"match": {
"auth0_managed": [
"<string>"
],
"geo_country_codes": [
"<string>"
]
},
"action": {
"active_provider_id": "simple_captcha",
"simple_captcha": {},
"auth_challenge": {
"fail_open": true
},
"recaptcha_v2": {
"site_key": "<string>"
},
"recaptcha_enterprise": {
"site_key": "<string>",
"project_id": "<string>"
},
"hcaptcha": {
"site_key": "<string>"
},
"friendly_captcha": {
"site_key": "<string>"
},
"arkose": {
"site_key": "<string>",
"client_subdomain": "<string>",
"verify_subdomain": "<string>",
"fail_open": true
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
]{
"message": "<string>",
"statusCode": 400,
"error": "Bad Request"
}{
"message": "<string>",
"statusCode": 401,
"error": "Unauthorized"
}{
"message": "<string>",
"statusCode": 403,
"error": "Forbidden"
}{
"message": "<string>",
"statusCode": 404,
"error": "Not Found"
}{
"message": "<string>",
"statusCode": 429,
"error": "Too Many Requests"
}Get CAPTCHA attack protection policies
Retrieve all CAPTCHA attack protection policies for the tenant, sorted by priority ascending.
GET
https://{tenantDomain}/api/v2
/
attack-protection
/
captcha
/
policies
Get CAPTCHA attack protection policies
curl --request GET \
--url https://{tenantDomain}/api/v2/attack-protection/captcha/policies \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenantDomain}/api/v2/attack-protection/captcha/policies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenantDomain}/api/v2/attack-protection/captcha/policies', 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://{tenantDomain}/api/v2/attack-protection/captcha/policies",
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://{tenantDomain}/api/v2/attack-protection/captcha/policies"
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://{tenantDomain}/api/v2/attack-protection/captcha/policies")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/attack-protection/captcha/policies")
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[
{
"id": "<string>",
"name": "<string>",
"priority": 2,
"match": {
"auth0_managed": [
"<string>"
],
"geo_country_codes": [
"<string>"
]
},
"action": {
"active_provider_id": "simple_captcha",
"simple_captcha": {},
"auth_challenge": {
"fail_open": true
},
"recaptcha_v2": {
"site_key": "<string>"
},
"recaptcha_enterprise": {
"site_key": "<string>",
"project_id": "<string>"
},
"hcaptcha": {
"site_key": "<string>"
},
"friendly_captcha": {
"site_key": "<string>"
},
"arkose": {
"site_key": "<string>",
"client_subdomain": "<string>",
"verify_subdomain": "<string>",
"fail_open": true
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
]{
"message": "<string>",
"statusCode": 400,
"error": "Bad Request"
}{
"message": "<string>",
"statusCode": 401,
"error": "Unauthorized"
}{
"message": "<string>",
"statusCode": 403,
"error": "Forbidden"
}{
"message": "<string>",
"statusCode": 404,
"error": "Not Found"
}{
"message": "<string>",
"statusCode": 429,
"error": "Too Many Requests"
}Authorizations
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
The tenant's CAPTCHA attack protection policies were successfully retrieved.
System-generated identifier for the policy.
Human-readable policy name.
Required string length:
1 - 255Conflict resolution order. Lower number takes higher precedence.
Required range:
x >= 1Traffic matching criteria for the policy. Exactly one of auth0_managed or geo_country_codes must be specified.
- Option 1
- Option 2
Show child attributes
Show child attributes
CAPTCHA configuration override stored for this policy.
Show child attributes
Show child attributes
ISO 8601 timestamp when the policy was created.
ISO 8601 timestamp when the policy was last updated.
Description of the policy's purpose.