A simple Rust library for (semi)anonymous SMS verification.
Able to obtain a phone number for SMS verification and to read messages from provided number.
Currently supports only a single provider - upmasked.com
with awc
client.
This library is not stable and it is in an experimental stage, meaning it is subject to change at any time; not recommended for use in a production system.
Instantiates a new provider and retrieves latest message from 'Google' on the first available number obtained from the default provider.
const ORIGIN: &str = "Google";
let mut provider = provider::instantiate();
let num = provider.get_any_number().await.expect("valid number");
let msg = provider
.get_latest_message_from(&num, ORIGIN)
.await
.expect("msg exists");
println!(
"Received message on {}: '{}'",
msg.created_at.expect("timestamp"),
msg.body
);
For a full working example, see the code in examples/latest_msg.rs
.