101 lines
2.9 KiB
Markdown
101 lines
2.9 KiB
Markdown
# AnyMessage API Reference
|
|
|
|
## Overview
|
|
AnyMessage.shop — temporary email activation service. Short-term (forwarding) and long-term (IMAP) emails.
|
|
API base: `https://api.anymessage.shop`
|
|
|
|
## Token
|
|
`FJiv6V9VyDem2W9q2reZag6N3w9p1FuB` (balance ~$0.95 as of 2026-07-06)
|
|
|
|
## Short-term Emails
|
|
|
|
### Get Balance
|
|
```
|
|
GET /user/balance?token=TOKEN
|
|
→ {"status":"success","balance":0.952}
|
|
```
|
|
|
|
### Check Available Domains for Site
|
|
```
|
|
GET /email/quantity?token=[REDACTED]
|
|
→ {"status":"success","data":{"gmail.com":{"count":114902,"price":0.024},...}}
|
|
```
|
|
|
|
### Order Email
|
|
```
|
|
GET /email/order?token=[REDACTED]
|
|
→ {"status":"success","id":"217314776006","email":"ibxkxj@gmail.com"}
|
|
```
|
|
|
|
### Get Message
|
|
```
|
|
GET /email/getmessage?token=[REDACTED]
|
|
→ {"status":"error","value":"wait message"} // not yet
|
|
→ {"status":"success","message":"<html>...</html>"} // received
|
|
```
|
|
|
|
### Other Short-term Endpoints
|
|
- `/email/reorder?token=[REDACTED] — refresh email
|
|
- `/email/cancel?token=[REDACTED] — cancel activation
|
|
|
|
## Long-term Emails (IMAP)
|
|
|
|
### Check Available
|
|
```
|
|
GET /longlive-email/quantity?token=[REDACTED]
|
|
→ {"data":{"hotmail.com":{"count":19271,"price":0.006},...}}
|
|
```
|
|
|
|
### Order (single)
|
|
```
|
|
GET /longlive-email/order?token=[REDACTED]
|
|
→ {"status":"success","count":1,"emails":[{"id":231004,"email":"user@hotmail.com","imap":{"password":"...","link":"mailhub.life","port":993}}],"total_price":0.006}
|
|
```
|
|
|
|
### Order (bulk, up to 1000)
|
|
```
|
|
GET /longlive-email/order?token=[REDACTED]
|
|
```
|
|
|
|
### Get History
|
|
```
|
|
GET /longlive-email/history?token=[REDACTED]
|
|
```
|
|
|
|
### Get Messages
|
|
```
|
|
GET /longlive-email/getlastmessages?token=[REDACTED]
|
|
GET /longlive-email/getmessages?token=[REDACTED]
|
|
```
|
|
|
|
### Find Email
|
|
```
|
|
GET /longlive-email/findemail?token=[REDACTED]
|
|
```
|
|
|
|
## IMAP Access (Long-term only)
|
|
- Host: `mailhub.life` (or the `link` field from order response)
|
|
- Port: 993 (SSL)
|
|
- Username: the email address
|
|
- Password: from `imap.password` in order response
|
|
|
|
### Check Spam via IMAP
|
|
```python
|
|
import imaplib, email
|
|
mail = imaplib.IMAP4_SSL(HOST, PORT)
|
|
mail.login(USER, PASS)
|
|
# Check spam/junk
|
|
for folder in ['Junk', '[Gmail]/Spam', 'Spam']:
|
|
status, _ = mail.select(folder)
|
|
if status == 'OK':
|
|
# Search and fetch messages
|
|
```
|
|
|
|
## Pitfalls
|
|
|
|
1. **Gmail goes to spam** — Misskey/dc.hhhl.cc verification emails go to Gmail spam. AnyMessage short-term API doesn't show spam folder. Use long-term Hotmail with IMAP to check spam.
|
|
2. **Short-term emails expire fast** — ~5-10 minutes. Poll `getmessage` immediately after registration, every 3-5 seconds.
|
|
3. **No Gmail for long-term** — Long-term only supports Hotmail/Outlook. Gmail only available as short-term.
|
|
4. **"wait message" = not yet arrived** — keep polling.
|
|
5. **"no activation" = expired** — order a new email.
|
|
6. **Site parameter matters** — use the site you're registering on (e.g., `dc.hhhl.cc`, `vip.j3gb.com`). Some sites may have different domain availability. |