API Authentication
API 経由で OpenBait にアクセスする方法
OpenBait API は API Key による認証を使用します。すべてのリクエストに Authorization header が必要です。
API Key の取得
- コンソールにログイン
- 設定 > API Keys に移動
- Create Key をクリック
- API Key をコピーして安全に保管
API Key は作成時に一度だけ表示されます。紛失した場合は再作成が必要です。
Authentication
すべての API リクエストの header に以下を追加:
Authorization: Bearer your_api_keyBase URL
https://api.openbait.com/v1
Request Example
curl -X GET "https://api.openbait.com/v1/threats" \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json"Response Format
すべての response は JSON 形式です:
{
"data": [...],
"meta": {
"total": 100,
"page": 1,
"per_page": 20
}
}Error Response
{
"error": {
"code": "unauthorized",
"message": "Invalid API key"
}
}| Status Code | 説明 |
|---|---|
400 | Bad Request — パラメータエラー |
401 | Unauthorized — 認証失敗 |
403 | Forbidden — アクセス権限なし |
404 | Not Found — リソースが存在しない |
429 | Too Many Requests — レート制限超過 |
500 | Internal Server Error |
Rate Limits
| Plan | Limit |
|---|---|
| Free | 60 req/min |
| Pro | 600 req/min |
| Enterprise | Unlimited |
制限超過時は 429 が返されます。Response header:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1705749600