API Keys y autenticacion
Busqueda objetivo: "api keys transporte como obtener", "autenticacion api carga"
Obtener token JWT
bash
curl -X POST "https://api.pro.cargoffer.com/api/auth/login" \
-H "Content-Type: application/json" \
-d '{"email": "tu@email.com", "password": "tu_password"}'Respuesta
json
{
"token": "eyJhbGciOiJIUzI1NiIs...",
"expiresIn": 86400,
"user": {
"id": "usr_123",
"email": "tu@email.com",
"company": "Transportes SL"
}
}Usar el token
bash
curl -X GET "https://api.pro.cargoffer.com/api/auction/active" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."Renovar
bash
curl -X POST "https://api.pro.cargoffer.com/api/auth/renew-token" \
-H "Authorization: Bearer <token_actual>"