twilio 1.1.0

Rust bindings for the Twilio API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use twilio::{Client, OutboundMessage};

#[tokio::main]
async fn main() {
    let to = "<to-number>";
    let from = "<from-number>";
    let body = "Hello, World! ";
    let app_id = "<app-id>";
    let auth_token = "<auth-token>";
    let client = Client::new(app_id, auth_token);
    let msg = OutboundMessage::new(from, to, body);
    match client.send_message(msg).await {
        Ok(m) => println!("{:?}", m),
        Err(e) => eprintln!("{:?}", e),
    }
}