bot チェックのシークレットを登録する
PUT
/config/botcheck-secret
const url = 'https://cyan.qelvorn.xyz/api/auth/config/botcheck-secret';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"secret":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://cyan.qelvorn.xyz/api/auth/config/botcheck-secret \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "secret": "example" }'Bot チェックプロバイダのシークレットキーを登録する。平文はこのリクエストでしか受けず、暗号化して保存する。スコープ: config。
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Bot チェックシークレット登録のリクエスト
Media typeapplication/json
object
secret
required
Bot チェックプロバイダのシークレットキー
string
Example generated
{ "secret": "example"}Responses
Section titled “Responses”シークレットを登録した。
Media typeapplication/json
object
ok
required
boolean
bot_check_secret_set
required
シークレットを登録した
boolean
Example
{ "ok": true, "bot_check_secret_set": true}リクエスト不正。
Media typeapplication/json
object
ok
required
boolean
code
required
エラーコード
string
Example
{ "ok": false, "code": "invalid_request"}トークンがない・無効(invalid_token)。
Media typeapplication/json
object
ok
required
boolean
code
required
エラーコード
string
Example
{ "ok": false, "code": "invalid_token"}スコープ不足・アプリ未承認・失効・停止。
Media typeapplication/json
object
ok
required
boolean
code
required
エラーコード
string
Example
{ "ok": false, "code": "insufficient_scope"}レート制限。Retry-After ヘッダー(秒)も返す。
Media typeapplication/json
object
ok
required
boolean
code
required
エラーコード
string
layer
required
制限が掛かった層。Retry-After ヘッダー(秒)も参照すること
string
Example
{ "ok": false, "code": "rate_limited", "layer": "token"}