Passer au contenu principal
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 ManagementClient(
            token: "<token>"
        );

        await client.AttackProtection.Captcha.UpdateAsync(
            new UpdateAttackProtectionCaptchaRequestContent()
        );
    }

}
package com.example.usage;

import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.resources.attackprotection.captcha.requests.UpdateAttackProtectionCaptchaRequestContent;

public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();

client.attackProtection().captcha().update(
UpdateAttackProtectionCaptchaRequestContent
.builder()
.build()
);
}
}
<?php

namespace Example;

use Auth0\SDK\API\Management\Management;
use Auth0\SDK\API\Management\AttackProtection\Captcha\Requests\UpdateAttackProtectionCaptchaRequestContent;

$client = new Management(
token: '<token>',
);
$client->attackProtection->captcha->update(
new UpdateAttackProtectionCaptchaRequestContent([]),
);
from auth0.management import ManagementClient

client = ManagementClient(
token="<token>",
)

client.attack_protection.captcha.update()
require "auth0"

client = Auth0::Management.new(token: "<token>")

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": {
    "site_key": "<string>",
    "fail_open": true,
    "client_subdomain": "<string>",
    "verify_subdomain": "<string>"
  },
  "auth_challenge": {
    "fail_open": true
  },
  "hcaptcha": {
    "site_key": "<string>"
  },
  "friendly_captcha": {
    "site_key": "<string>"
  },
  "recaptcha_enterprise": {
    "site_key": "<string>",
    "project_id": "<string>"
  },
  "recaptcha_v2": {
    "site_key": "<string>"
  },
  "simple_captcha": {}
}

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Corps

active_provider_id
enum<string>

The id of the active provider for the CAPTCHA.

Options disponibles:
arkose,
auth_challenge,
friendly_captcha,
hcaptcha,
recaptcha_v2,
recaptcha_enterprise,
simple_captcha
Maximum string length: 36
arkose
object
auth_challenge
object
hcaptcha
object
friendly_captcha
object
recaptcha_enterprise
object
recaptcha_v2
object
simple_captcha
object

Réponse

Captcha configuration successfully retrieved.

active_provider_id
string
arkose
object
auth_challenge
object
hcaptcha
object
friendly_captcha
object
recaptcha_enterprise
object
recaptcha_v2
object
simple_captcha
object