Skip to main content

Crate cybertemp

Crate cybertemp 

Source
Expand description

§cybertemp

Async Rust SDK for CyberTemp — disposable email inboxes for testing, automation, OTP flows, and AI agents.

use cybertemp::Client;
use std::time::Duration;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let client = Client::new("tk_...");
    let inbox = client.create_inbox().await?;
    let otp = client.wait_for_otp(&inbox.id, Duration::from_secs(30)).await?;
    println!("OTP: {otp}");
    Ok(())
}

Errors carry full context — when a tier/cap blocks a call you get an Error::Upgrade with the same required_tier / upgrade_url payload the standalone API returns, so you can surface a real CTA.

Structs§

Client
CyberTemp HTTP client.
CreateInboxOptions
Optional fields for create_inbox.
Inbox
A disposable inbox.
Message
One message inside an inbox.
Usage
{used, limit} returned on cap-related errors.

Enums§

Error
SDK error type. Use matches! on the variant to handle tier/cap blocks vs. transient rate limits vs. anything else.

Constants§

DEFAULT_BASE_URL
Default base URL for the public CyberTemp API.