Appearance
Authentication API
Base URL:
https://your-domain.com
Authentication endpoints for both admin/staff users and subscribers.
Modules
| Module | Description |
|---|---|
| 📁 User Authentication | Admin/Staff login, logout, token refresh |
| 📁 Subscriber Authentication | Subscriber login, logout, token refresh |
Quick Reference
User Authentication
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/auth/login | Admin/Staff login |
| POST | /api/v1/auth/logout | Logout |
| POST | /api/v1/auth/refresh | Refresh token |
| GET | /api/v1/auth/user | Get user info |
Subscriber Authentication
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/subscriber/auth/login | Subscriber login |
| POST | /api/v1/subscriber/auth/logout | Subscriber logout |
| POST | /api/v1/subscriber/auth/refresh | Refresh token |
| GET | /api/v1/subscriber/auth/profile | Get profile |
Token Usage
After successful login, include the token in all authenticated requests:
http
Authorization: Bearer your-auth-tokenToken Expiry
- Access Token: 60 minutes
- Refresh Token: 7 days
Use the refresh endpoint to get a new access token before expiry.
