VieclamVang
Production-ready REST API
Everything you need to integrate authentication, profile management, roles, files, settings, and dashboard data from the VieclamVang platform.
Base URL
https://api.vieclamvang.com/api/v1
The API uses Laravel Sanctum personal access tokens. Login returns an `access_token` and `refresh_token`. Send the access token in the Authorization header.
POST /auth/login
{
"email": "dev@vieclamvang.com",
"password": "your-password"
}
Success Response
{
"success": true,
"data": {
"access_token": "1|...",
"refresh_token": "2|...",
"token_type": "Bearer",
"expires_in": 300
}
}
Authenticated Request Header
Authorization: Bearer {access_token}
Accept: application/json
Primary endpoints from the core API route file. Protected routes require `auth:sanctum` + `abilities:access` and may require permission middleware.
300s
Access token TTL (`config('cms.access_token_ttl_seconds')`).
60m
Password reset token expiry (`config/auth.php`).
60s
Password reset token generation throttle (`config/auth.php`).
Error responses follow a consistent envelope with `success: false` and an `error` object containing `code`, `message`, and optional `errors` details.
| HTTP | Error Code | Meaning |
|---|---|---|
| 401 | UNAUTHENTICATED / AUTH_INVALID_CREDENTIALS | Missing or invalid credentials/token. |
| 422 | VALIDATION_ERROR | Request validation failed. |
| 401 | AUTH_TOKEN_INVALID | Refresh token invalid or expired. |
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "The email field is required.",
"errors": {
"email": ["The email field is required."]
}
}
}