Token
🇬🇧 English
Note: Username and password are generated in the BizMail Portal. Please log in to your account at the portal to obtain your credentials before calling these APIs.
1. Generate Token
POST /api/1.0/auth/token
Generate a JWT access token and refresh token using your BizMail Portal credentials.
Headers
Body (JSON)
Example Request
Responses
200 OK — Success
400 Bad Request
401 Unauthorized
500 Internal Server Error
2. Refresh Token
POST /api/1.0/auth/refresh
Use the refresh_token to get a new pair of access token and refresh token without re-entering credentials.
Headers
Body (JSON)
Example Request
Responses
200 OK — Success
400 Bad Request
401 Unauthorized — Token expired
401 Unauthorized — Invalid token
Usage Flow
🇻🇳 Tiếng Việt
Lưu ý: Username và password được tạo trên BizMail Portal. Vui lòng đăng nhập vào tài khoản của bạn trên portal để lấy thông tin đăng nhập trước khi gọi các API này.
1. Lấy Token
POST /api/1.0/auth/token
Tạo JWT access token và refresh token từ thông tin đăng nhập trên BizMail Portal.
Headers
Body (JSON)
Ví dụ Request
Responses
200 OK — Thành công
400 Bad Request
401 Unauthorized
500 Internal Server Error
2. Refresh Token
POST /api/1.0/auth/refresh
Dùng refresh_token để lấy cặp token mới mà không cần nhập lại username/password.
Headers
Body (JSON)
Ví dụ Request
Responses
200 OK — Thành công
400 Bad Request
401 Unauthorized — Token hết hạn
401 Unauthorized — Token không hợp lệ