C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.AttackProtection;
public partial class Examples
{
public async Task Example() {
var client = new ManagementApiClient(
token: "<token>",
clientOptions: new ClientOptions { BaseUrl = "https://{YOUR_DOMAIN}/api/v2" }
);
await client.AttackProtection.Captcha.UpdateAsync(
new UpdateAttackProtectionCaptchaRequestContent()
);
}
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.attackprotection.types.UpdateAttackProtectionCaptchaRequestContent;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.attackProtection().captcha().update(
UpdateAttackProtectionCaptchaRequestContent
.builder()
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\AttackProtection\Captcha\Requests\UpdateAttackProtectionCaptchaRequestContent;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->attackProtection->captcha->update(
new UpdateAttackProtectionCaptchaRequestContent([]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.attack_protection.captcha.update()
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.attack_protection.captcha.update
curl --request PATCH \
--url https://{tenantDomain}/api/v2/attack-protection/captcha \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"simple_captcha": {}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({simple_captcha: {}})
};
fetch('https://{tenantDomain}/api/v2/attack-protection/captcha', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenantDomain}/api/v2/attack-protection/captcha"
payload := strings.NewReader("{\n \"simple_captcha\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"active_provider_id": "<string>",
"arkose": {
"client_subdomain": "<string>",
"fail_open": true,
"site_key": "<string>",
"verify_subdomain": "<string>"
},
"auth_challenge": {
"fail_open": true
},
"friendly_captcha": {
"site_key": "<string>"
},
"hcaptcha": {
"site_key": "<string>"
},
"recaptcha_enterprise": {
"project_id": "<string>",
"site_key": "<string>"
},
"recaptcha_v2": {
"site_key": "<string>"
},
"simple_captcha": {}
}CAPTCHA 設定を部分更新
クライアントの既存の CAPTCHA 設定を更新します。
PATCH
https://{tenantDomain}/api/v2
/
attack-protection
/
captcha
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.AttackProtection;
public partial class Examples
{
public async Task Example() {
var client = new ManagementApiClient(
token: "<token>",
clientOptions: new ClientOptions { BaseUrl = "https://{YOUR_DOMAIN}/api/v2" }
);
await client.AttackProtection.Captcha.UpdateAsync(
new UpdateAttackProtectionCaptchaRequestContent()
);
}
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.attackprotection.types.UpdateAttackProtectionCaptchaRequestContent;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.attackProtection().captcha().update(
UpdateAttackProtectionCaptchaRequestContent
.builder()
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\AttackProtection\Captcha\Requests\UpdateAttackProtectionCaptchaRequestContent;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->attackProtection->captcha->update(
new UpdateAttackProtectionCaptchaRequestContent([]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.attack_protection.captcha.update()
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.attack_protection.captcha.update
curl --request PATCH \
--url https://{tenantDomain}/api/v2/attack-protection/captcha \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"simple_captcha": {}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({simple_captcha: {}})
};
fetch('https://{tenantDomain}/api/v2/attack-protection/captcha', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenantDomain}/api/v2/attack-protection/captcha"
payload := strings.NewReader("{\n \"simple_captcha\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"active_provider_id": "<string>",
"arkose": {
"client_subdomain": "<string>",
"fail_open": true,
"site_key": "<string>",
"verify_subdomain": "<string>"
},
"auth_challenge": {
"fail_open": true
},
"friendly_captcha": {
"site_key": "<string>"
},
"hcaptcha": {
"site_key": "<string>"
},
"recaptcha_enterprise": {
"project_id": "<string>",
"site_key": "<string>"
},
"recaptcha_v2": {
"site_key": "<string>"
},
"simple_captcha": {}
}承認
bearerAuthoAuth2ClientCredentials
ボディ
application/jsonapplication/x-www-form-urlencoded
レスポンス
CAPTCHA 設定を正常に取得しました。