cybertemp
Async Rust SDK for CyberTemp — disposable email inboxes for testing, automation, OTP flows, and AI agents.
- Spin up a temp inbox in one call
- Poll for incoming mail with a sane timeout
- Pull a one-time code out of the body without parsing HTML yourself
- Typed errors for upgrade-required and rate-limited responses
Built on reqwest + tokio with rustls (no OpenSSL dependency).
Install
[]
= "0.1"
= { = "1", = ["full"] }
Or:
You'll need an API key — get one at https://www.cybertemp.xyz/settings.
Quickstart
use Client;
use Duration;
async
API
// Create a fresh disposable address
client.create_inbox.await?;
// Inboxes owned by your API key
client.list_inboxes.await?;
// Most recent first
client.read_messages.await?;
// Polls until a message arrives or the timeout elapses
client.wait_for_message.await?;
// Pro plan and above — extracts a 4–8 digit code from the body
client.wait_for_otp.await?;
// Frees a slot against your plan limit
client.delete_inbox.await?;
Full type docs live on https://docs.rs/cybertemp.
Errors
cybertemp::Error is a typed enum — Upgrade and RateLimited carry the structured info CyberTemp returns so you can react instead of just retrying blindly:
use Error;
match client.wait_for_otp.await
Use cases
- Playwright / Puppeteer tests — sign up a fresh user every run, intercept the verification email, extract the OTP, click through. No mailbox mocking, no flaky shared inboxes.
- AI agents — spin up an inbox per agent task, let it sign up for services and confirm itself.
- Manual QA — Burst-create 50 inboxes for a workflow demo, then
delete_inboxthem at the end.
Links
- Website: https://www.cybertemp.xyz
- Get an API key: https://www.cybertemp.xyz/settings
- API docs: https://www.cybertemp.xyz/api-docs
- Crate docs: https://docs.rs/cybertemp
License
MIT