Autenticación de la API — Tokens JWT
La API de OODA Intelligence utiliza autenticación JWT (JSON Web Tokens) en todas las peticiones.
Cómo obtener un token
Haga una petición POST al endpoint de autenticación:
curl -X POST https://dashboard.oodaintel.com/api/v1/auth/token/ \
-H "Content-Type: application/json" \
-d '{"username": "su_usuario", "password": "su_contrasena"}'
Respuesta
{
"access": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."
}
Cómo usar el token
Incluya el token de acceso en el header Authorization de todas las peticiones:
curl -X GET https://dashboard.oodaintel.com/api/v1/monitoring/ \
-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."
Cómo renovar el token
Cuando el token de acceso caduque, use el refresh token:
curl -X POST https://dashboard.oodaintel.com/api/v1/auth/token/refresh/ \
-H "Content-Type: application/json" \
-d '{"refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."}'
Rate Limiting
Los límites de peticiones dependen del plan contratado:
| Plan | Límite |
|---|---|
| Starter | 100 req/min |
| Professional | 500 req/min |
| Enterprise | 2.000 req/min |
Errores frecuentes
| Código | Descripción |
|---|---|
| 401 | Token inválido o caducado |
| 403 | Sin permiso para el recurso |
| 429 | Rate limit superado |