📧 Read Mail API
API สำหรับตรวจสอบสถานะบัญชี Gmail แบบ real-time รวดเร็ว แม่นยำ
Base URL:
https://read-mail.me
Authentication
ทุก request ต้องแนบ API Key โดยใส่ใน HTTP Header:
X-API-Key: your_api_key_here
หรือแนบใน request body:
{
"api_key": "your_api_key_here",
"emails": [...]
}
รับ API Key ได้ที่ Dashboard → API Keys
Rate Limiting
| แพคเกจ | Limit/วัน | Max/Request |
|---|---|---|
| Free | 100 emails/วัน | 1,000 emails |
| Premium 1 เดือน | 100,000 emails/วัน | 1,000 emails |
| Premium 3 เดือน | 500,000 emails/วัน | 1,000 emails |
| Premium 1 ปี | 1,000,000 emails/วัน | 1,000 emails |
| หมายเหตุ: ส่งได้สูงสุด 1,000 emails ต่อ 1 request (เกินจะถูกตัดอัตโนมัติ) — หากมีมากกว่านี้ให้แบ่งส่งเป็นชุด | ||
เมื่อเกิน limit จะได้รับ HTTP 429 พร้อม remaining และ reset_at
Error Codes
| HTTP Code | Error | ความหมาย |
|---|---|---|
400 | Missing emails | ไม่ได้ส่ง emails array |
401 | Missing API Key | ไม่ได้แนบ API Key |
401 | Invalid API Key | API Key ไม่ถูกต้อง |
403 | API Key Disabled | API Key ถูกปิดใช้งาน |
403 | Account Suspended | บัญชีถูกระงับ |
429 | Rate Limit Exceeded | เกิน quota รายวัน |
502 | Upstream Error | ระบบตรวจสอบขัดข้อง |
Gmail Check
POST
/api/gmail/check
ตรวจสอบสถานะ Gmail หลายบัญชีพร้อมกัน (สูงสุด 100 emails/request)
Request Headers
| Header | Required | ค่า |
|---|---|---|
Content-Type | required | application/json |
X-API-Key | required | API Key ของคุณ |
Request Body
| Field | Type | Required | รายละเอียด |
|---|---|---|---|
emails | array | required | รายการ email สูงสุด 1,000 รายการต่อ request |
Response
{
"success": true,
"job_id": "job-1234-1789476141356",
"total": 3,
"status_url": "https://read-mail.me/api/gmail/status",
"limit": 100,
"used": 3,
"remaining": 97,
"reset_at": "2026-09-16 00:00:00 (Asia/Bangkok)"
}
ขั้นตอนการใช้งาน (2 ขั้น)
1. ส่ง
2. เรียก
POST /api/gmail/check พร้อมรายการอีเมล → ได้ job_id กลับมาทันที2. เรียก
POST /api/gmail/status ทุก 2-3 วินาที เพื่อดูความคืบหน้าและผลลัพธ์ จนกว่า state จะเป็น completed
Check Status
POST
/api/gmail/status
ดูความคืบหน้าและผลลัพธ์ของงานที่ส่งไว้ (เรียกซ้ำได้จนกว่างานจะเสร็จ)
Request Body
| Field | Type | Required | รายละเอียด |
|---|---|---|---|
job_id | string | required | รหัสงานที่ได้จาก /api/gmail/check |
Response
{
"success": true,
"job_id": "job-1234-1789476141356",
"state": "processing",
"total": 3,
"completed": 2,
"results": [
{ "email": "[email protected]", "status": "live" },
{ "email": "[email protected]", "status": "ver" },
{ "email": "[email protected]", "status": "pending" }
]
}
Job State
| State | ความหมาย |
|---|---|
pending | งานอยู่ในคิว รอเริ่มประมวลผล |
processing | กำลังตรวจสอบ (ผลบางส่วนพร้อมใช้งานแล้ว) |
completed | ตรวจสอบครบทุกอีเมลแล้ว |
Status Values
| Status | ความหมาย |
|---|---|
| live | บัญชีใช้งานได้ปกติ |
| disabled | บัญชีถูกระงับการใช้งาน |
| unregistered | ยังไม่ได้ลงทะเบียน Gmail |
| not_exists | บัญชีไม่มีอยู่จริง |
| unknown | ไม่สามารถระบุสถานะได้ |
| ver | บัญชีต้องยืนยันตัวตน (phone verification) |
| failed | ตรวจสอบไม่สำเร็จ ระบบคืนเครดิตอัตโนมัติ |
| pending | ยังตรวจสอบไม่เสร็จ (จะเปลี่ยนเป็นสถานะจริงเมื่อเสร็จ) |
ตัวอย่างการเรียกใช้
# 1) submit -> job_id
curl -s -X POST https://read-mail.me/api/gmail/check \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{"emails":["[email protected]","[email protected]"]}'
# 2) poll status (repeat every 2-3s until state = completed)
curl -s -X POST https://read-mail.me/api/gmail/status \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{"job_id":"job-1234-1789476141356"}'
<?php
$apiKey = 'YOUR_API_KEY';
$base = 'https://read-mail.me/api/gmail';
function callApi($url, $apiKey, $payload) {
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode($payload),
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'X-API-Key: ' . $apiKey,
],
CURLOPT_TIMEOUT => 60,
]);
$res = curl_exec($ch);
curl_close($ch);
return json_decode($res, true);
}
// 1) submit
$job = callApi("$base/check", $apiKey, [
'emails' => ['[email protected]', '[email protected]']
]);
if (empty($job['job_id'])) {
die('Error: ' . ($job['message'] ?? 'submit failed'));
}
echo "Job: {$job['job_id']} ({$job['total']} emails)\n";
// 2) poll จนเสร็จ
while (true) {
sleep(3);
$st = callApi("$base/status", $apiKey, ['job_id' => $job['job_id']]);
echo " {$st['state']} {$st['completed']}/{$st['total']}\n";
if (($st['state'] ?? '') === 'completed') break;
}
// 3) แสดงผล
foreach ($st['results'] as $r) {
echo $r['email'] . ' => ' . $r['status'] . "\n";
}
import requests, time
API_KEY = 'YOUR_API_KEY'
BASE = 'https://read-mail.me/api/gmail'
HEADERS = {'Content-Type': 'application/json', 'X-API-Key': API_KEY}
# 1) submit
job = requests.post(f'{BASE}/check', headers=HEADERS, json={
'emails': ['[email protected]', '[email protected]']
}).json()
if not job.get('job_id'):
raise SystemExit('Error: ' + job.get('message', 'submit failed'))
print(f"Job: {job['job_id']} ({job['total']} emails)")
# 2) poll until completed
while True:
time.sleep(3)
st = requests.post(f'{BASE}/status', headers=HEADERS,
json={'job_id': job['job_id']}).json()
print(f" {st['state']} {st['completed']}/{st['total']}")
if st.get('state') == 'completed':
break
# 3) results
for r in st['results']:
print(f"{r['email']} => {r['status']}")
const API_KEY = 'YOUR_API_KEY';
const BASE = 'https://read-mail.me/api/gmail';
const HEADERS = {
'Content-Type': 'application/json',
'X-API-Key': API_KEY
};
const post = (path, payload) =>
fetch(`${BASE}/${path}`, {
method: 'POST',
headers: HEADERS,
body: JSON.stringify(payload)
}).then(r => r.json());
async function checkEmails(emails) {
// 1) submit
const job = await post('check', { emails });
if (!job.job_id) throw new Error(job.message || 'submit failed');
console.log(`Job: ${job.job_id} (${job.total} emails)`);
// 2) poll until completed
while (true) {
await new Promise(r => setTimeout(r, 3000));
const st = await post('status', { job_id: job.job_id });
console.log(` ${st.state} ${st.completed}/${st.total}`);
if (st.state === 'completed') return st.results;
}
}
// 3) results
checkEmails(['[email protected]', '[email protected]'])
.then(results => results.forEach(r =>
console.log(`${r.email} => ${r.status}`)))
.catch(err => console.error('Error:', err.message));
แพคเกจ
| แพคเกจ | ราคา | Limit/วัน |
|---|---|---|
| Free | ฟรี | 100 emails/วัน (ไม่มีวันหมดอายุ) |
| Premium 1 เดือน | 5 USDT | 100,000 emails/วัน (30 วัน) |
| Premium 3 เดือน | 12 USDT | 500,000 emails/วัน (90 วัน) |
| Premium 1 ปี | 45 USDT | 1,000,000 emails/วัน (365 วัน) |