Files
autoreg-skills-max/skills/bulk-account-registration/references/mailtm-api.md

69 lines
2.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# mail.tm Disposable Email API
Бесплатный disposable email API. Не требует регистрации, токен через JWT.
## API Base
`https://api.mail.tm`
## Create Account
```python
import urllib.request, json, time
# Генерация уникального адреса
addr = f"user{int(time.time()) % 100000000}@emalupe.com"
req = urllib.request.Request(
'https://api.mail.tm/accounts',
data=json.dumps({'address': addr, 'password': 'StrongPass123!'}).encode(),
headers={'Content-Type': 'application/json'}
)
resp = urllib.request.urlopen(req)
data = json.loads(resp.read())
# → {"id": "...", "address": "user12345678@emalupe.com", ...}
```
## Get Token (JWT)
```python
req = urllib.request.Request(
'https://api.mail.tm/token',
data=json.dumps({'address': addr, 'password': 'StrongPass123!'}).encode(),
headers={'Content-Type': 'application/json'}
)
resp = urllib.request.urlopen(req)
data = json.loads(resp.read())
token = data['token'] # JWT for Bearer auth
```
## Check Inbox
```python
req = urllib.request.Request(
'https://api.mail.tm/messages',
headers={'Authorization': f'Bearer {token}'}
)
resp = urllib.request.urlopen(req)
data = json.loads(resp.read())
# → {"hydra:member": [{"id": "...", "subject": "...", ...}]}
```
## Read Message
```python
req = urllib.request.Request(
f'https://api.mail.tm/messages/{msg_id}',
headers={'Authorization': f'Bearer {token}'}
)
resp = urllib.request.urlopen(req)
data = json.loads(resp.read())
# → {"html": ["<html>..."], "text": "..."}
```
## Pitfalls
- **Домен `@emalupe.com`**: не блокируется большинством сервисов (в отличие от `@mail.tm`, `@guerrillamail.com`)
- **Токен короткоживущий**: получай свежий токен перед каждым использованием
- **Rate limit**: ~3-5 запросов подряд, потом пауза
- **Не все сервисы принимают**: ClickUp, Stagewise, некоторые AI-платформы блокируют disposable домены
- **Для массовой регистрации**: лучше Gmail+aliases, catch-all домены, или temp.coda.ink