SIM Register Service - API Reference
Base URL: https://portal.thong2303.io.vn
Authorization: <token> hoặc trong body/query parameter token. Token được nhận từ API Login.
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
email |
String | Required | Email đăng nhập |
password |
String | Required | Mật khẩu (tối thiểu 8 ký tự) |
{
"email": "user@example.com",
"password": "password123"
}
{
"code": 200,
"message": "Đăng nhập thành công.",
"point": 50000,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"user": {
"email": "user@example.com",
"fullname": "Nguyễn Văn A",
"point": 50000,
"countBuyMail": 10,
"countBuySim": 5
}
}
Authorization: <token>
Content-Type: application/json
{"token": "..."} hoặc query: ?token=...
Không cần body (nếu đã gửi token trong header)
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
{
"code": 200,
"point": 50000,
"email": "user@example.com"
}
Authorization: <token>
Content-Type: application/json
Không cần body
{
"code": 200,
"data": [
{
"id": 9,
"name": "Facebook",
// ... các thông tin app khác
}
]
}
Authorization: <token>
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
appId |
Number | Required | ID của app từ danh sách app (API 1) |
prefixCarrier |
String | Optional | Đầu số nhà mạng để lọc (ví dụ: "091", "098") |
carrierId |
Number | Optional | ID nhà mạng: 6-Viettel, 7-Vinaphone, 8-Vietnamobile, 9-MobiFone, 10-Itel, 11-Reddi, 12-Asim, 13-Myanmar, 14-G-Mobile, 15-Campuchia, 16-Mozmabi |
carrierIdExpel |
Number | Optional | ID nhà mạng cần loại bỏ |
countryCode |
String | Optional | Mã quốc gia: VNM (Việt Nam), CAM (Campuchia), MOZ (Mozambique) |
prefixCarrierExpel |
String | Optional | Đầu số cần loại bỏ (ví dụ: "58") |
{
"appId": 9,
"prefixCarrier": "091",
"carrierId": 6
}
{
"message": "...",
"data": {
"id": 123456,
"number": "0912345678",
// ... thông tin sim khác
}
}
Authorization: <token>
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
id |
Number | Required | ID của SIM từ kết quả đăng ký (API 2) |
{
"id": 123456
}
{
"message": "...",
"data": [
{
"id": 6535141,
"otp": "473478",
"message": "473478 là mã xác minh FACEBOOK của bạn.",
"sender": "FACEBOOK",
"type": "sms",
"created_at": "2024-04-22T13:16:06.000Z"
}
]
}
Authorization: <token>
?token=...
| Parameter | Type | Required | Description |
|---|---|---|---|
type |
String | Optional | Loại record: sim hoặc mail (mặc định: sim) |
token |
String | Optional | Token authentication (nếu không gửi trong header) |
https://portal.thong2303.io.vn/api/reg-record/?type=sim - Lấy lịch sử đăng ký SIMhttps://portal.thong2303.io.vn/api/reg-record/?type=mail - Lấy lịch sử đăng ký Mailhttps://portal.thong2303.io.vn/api/reg-record/?type=sim&token=... - Với token trong query{
"status": 200,
"data": [
{
"type": "sim",
"user": "user@example.com",
"attributes": {
"id": 123456,
"number": "0912345678",
"appId": 9
},
"otp": [
{
"id": 6535141,
"otp": "473478",
"message": "473478 là mã xác minh FACEBOOK của bạn.",
"sender": "FACEBOOK",
"type": "sms",
"created_at": "2024-04-22T13:16:06.000Z"
}
],
"status": "getted",
"createdAt": "2024-04-22T13:15:00.000Z",
"updatedAt": "2024-04-22T13:16:06.000Z"
}
]
}
sim hoặc mail)pending - chưa lấy OTP, getted - đã lấy OTP)POST /api/auth/login với email và password để nhận token. Lưu token này lại!POST /api/auth/checkPoint với token để kiểm tra số điểm hiện cóPOST /api/app/ (kèm token) để lấy danh sách app và chọn appIdPOST /api/sim/registerSIM (kèm token) với appId để đăng ký SIM, nhận được id của SIMPOST /api/sim/getOTPByID (kèm token) với id của SIM để lấy mã OTPGET /api/reg-record/?type=sim (kèm token) để xem lịch sử đăng ký và OTP đã lấy© 2024 SIM Register Service