Obter um desafio
RegistosGET /challenge
Issue a proof-of-work bot challenge when the builtin provider is active
Issues a short-lived SHA-256 proof-of-work challenge when the server is configured with security.challenge.provider=builtin. Returns 404 otherwise. Served with Cache-Control: no-store and rate-limited per IP.
Parâmetros
scopeThe form the challenge protects. The solved challenge is bound to this scope and is accepted only by the request of that form.
um de
identity.signup,identity.login,identity.password_reset,identity.verification_code,connection.estimate,connection.request,intake.contact,intake.docs_feedback
Devolve
curl -X GET "$PUBLIC_API/challenge"
# Sem comando CLI equivalente; use cURL ou HTTP directo.
const res = await fetch("$PUBLIC_API/challenge", {
method: "GET"
});
const data = await res.json();
import requests
res = requests.get(
"$PUBLIC_API/challenge"
)
data = res.json()
req, _ := http.NewRequest("GET", "$PUBLIC_API/challenge", nil)
resp, err := http.DefaultClient.Do(req)
Resposta 200
{
"algorithm": "SHA-256",
"challenge": "challenge",
"maxnumber": 1,
"salt": "salt",
"signature": "signature"
}