无需登录 · 无需 API 密钥
立即匿名开始
与驱动 TempMail 网页版相同的底层 API。每个邮箱都会分配一个随机地址,有效期为 24 小时。
- 1POST /accounts 用于创建带有随机地址和密码的邮箱。
- 2POST /token 使用地址和密码换取 tm_box_ 邮箱 Token。
- 3GET /messages 返回收到的邮件,并已自动提取出验证码。
BASE=https://www.tempmail.ai/api/v1
# 1. Create a mailbox (random address + password)
curl -s -X POST "$BASE/accounts" \
-H "Content-Type: application/json" -d '{}'
# {"id":"…","address":"k3x9m2q7…@tempmail.ai","password":"…","expires_at":"…"}
# 2. Exchange the credentials for a mailbox token
curl -s -X POST "$BASE/token" \
-H "Content-Type: application/json" \
-d '{"address":"ADDRESS","password":"PASSWORD"}'
# {"id":"…","token":"tm_box_…","token_type":"Bearer","expires_at":"…"}
# 3. Read messages – verification codes are already extracted
curl -s "$BASE/messages" -H "Authorization: Bearer TOKEN"
# {"items":[{"from":"[email protected]","subject":"Your verification code","verification_code":"482913",…}],"total":1,…}