For web applications requiring user context:
Get JWT Token
curl -X POST "https://rebusai.com/api/v1/auth/login/" \
-H "Content-Type: application/json" \
-d '{
"username": "user@example.com",
"password": "secure_password"
}'
JWT Response
{
"success": true,
"data": {
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"expires_in": 3600,
"token_type": "JWT",
"user": {
"id": 456,
"email": "user@example.com",
"name": "John Manager",
"role": "affiliate_manager"
}
},
"message": "Authentication successful"
}
Use JWT Token
curl -X GET "https://rebusai.com/api/v1/affiliate/affiliates/" \
-H "Authorization: JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."