Toàn bộ API đều hỗ trợ xác thực bảo mật qua query parameter password hoặc header X-Mailbox-Password:
1. Tạo địa chỉ email ngẫu nhiên (kèm mật khẩu bảo vệ)
GET /api/v1/random?domain=chungsucaov.site
Response:
{
"status": "success",
"email": "x7k9p2@chungsucaov.site",
"password": "893120",
"is_protected": true
}
2. Lấy danh sách thư & mã OTP (Bắt buộc có mật khẩu)
GET /api/v1/inbox?email=x7k9p2@chungsucaov.site&password=893120
Header thay thế:
X-Mailbox-Password: 893120
Response:
{
"status": "success",
"is_protected": true,
"count": 1,
"messages": [
{
"id": "1730857321.M921...",
"subject": "Mã xác thực tài khoản Facebook",
"from": "Facebook ",
"otp": "491028",
"snippet": "Chào bạn, mã xác nhận đăng nhập là 491028..."
}
]
}
3. Đọc chi tiết nội dung email theo ID
GET /api/v1/message/{message_id}?password=893120
Response:
{
"status": "success",
"data": {
"id": "1730857321...",
"subject": "Mã xác nhận Facebook",
"otp": "491028",
"body_text": "...",
"body_html": "..."
}
}
Ví dụ Python Bot (Tự động nhận OTP)
import requests, time
# 1. Tạo email và nhận mật khẩu
acc = requests.get("http://160.191.245.1:3088/api/v1/random").json()
email, password = acc["email"], acc["password"]
print(f"Email: {email} | Password: {password}")
# 2. Polling chờ mã OTP
while True:
res = requests.get(
"http://160.191.245.1:3088/api/v1/inbox",
params={"email": email, "password": password}
).json()
for msg in res.get("messages", []):
if msg.get("otp"):
print("ĐÃ TÌM THẤY MÃ OTP:", msg["otp"])
exit(0)
time.sleep(3)