Login with Basic Authentication
**Automated Authentication Process:**
Automated Authentication Process:
Step 1: Basic Auth Login
- Click the 'Authorize' button at the top of this page
- Enter your credentials in Basic Auth section:
- Username:
your_username - Password:
your_password
- Username:
- Click 'Authorize'
- Call this endpoint to get your API token
Step 2: Automatic Token Injection
- The token will be automatically injected into the knoxApiToken field
- No manual copying or pasting required!
- You can immediately start making API calls
The token expires 7 days after its last use. Each authenticated request slides the expiry forward, so a token dies only after 7 days of inactivity. Get a new one by repeating this process.
Authorization
basicAuth AuthorizationBasic <token>
In: header
TypeScript Definitions
Use the request body type in TypeScript.
Serializer for login response - automatically generated from User model
Response Body
application/json
curl -X POST "https://example.com/auth/login/" \ -H "Content-Type: application/json" \ -d '{ "token": "string", "expiry": "2019-08-24T14:15:22Z" }'User with no organization: org_id and org_name are null; is_org_admin is false.
{ "token": "9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b", "expiry": "2024-01-02T10:30:00Z", "user": { "id": 1, "username": "john_doe", "email": "john@example.com", "first_name": "John", "last_name": "Doe", "alert_media": 1, "alert_title": "Home", "mobile_phone": "+1234567890", "stripe_customer_id": "cus_1234567890", "dashboard_product": 1, "dashboard_product_label": null, "org_id": null, "org_name": null, "is_org_admin": false, "last_login": null, "groups": [], "product_categories": [] }}
