basic/
basic.rs

1use linkmobility::{
2    account::Account,
3    address::Address,
4    client::Client,
5    rest_api::{PlatformID, PlatformPartnerID, SMS},
6};
7
8#[tokio::main]
9async fn main() {
10    static USERNAME: &str = "fkwIzx6c"; //"gvwXYp4s";
11    static PASSWORD: &str = "AaVF95VBS9jHX3CU";
12    static SOURCE: &str = "46768108001"; //"4796223160";
13    static DESTINATION: &str = "+46760281011";
14    static PLATFORM_ID: &str = "COMMON_API";
15    static PLATFORM_PARTNER_ID: &str = "23142"; //"22753";
16
17    let client = Client::new(Account::new(
18        USERNAME,
19        PASSWORD,
20        "https://n-eu.linkmobility.io/",
21    ));
22    let response = SMS::with_text(
23        Address::new(SOURCE.to_string()),
24        Address::new(DESTINATION.to_string()),
25        PlatformID::new(PLATFORM_ID),
26        PlatformPartnerID::new(PLATFORM_PARTNER_ID),
27        "Sms via Link Mobility",
28    )
29    .send(&client)
30    .await
31    .expect("error");
32    println!("{response:?}");
33}