Skip to content

A simple Rust library for (semi)anonymous SMS verification.

License

Notifications You must be signed in to change notification settings

matej-g/sms-verifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sms-verifier

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.

⚠️ Disclaimer ⚠️

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.

Usage Example

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.

About

A simple Rust library for (semi)anonymous SMS verification.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages