RegisterDevice
---functions---
account.registerDevice#ec86017a no_muted:flags.0?true token_type:int token:string app_sandbox:Bool secret:bytes other_uids:Vector<long> = Bool
Returns
Parameters
Example
Replace placeholder values with real data before running.
use ferogram::tl::functions;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let (client, _) = ferogram::Client::quick_connect(
"my.session",
12345,
"0123456789abcdef0123456789abcdef",
)
.await?;
let result = client
.invoke(
&functions::account::RegisterDevice {
no_muted: false,
token_type: 0_i32,
token: "".to_string(),
app_sandbox: false,
secret: vec![],
other_uids: vec![],
},
)
.await?;
println!("{result:?}");
Ok(())
}
use ferogram::tl::functions;
use ferogram::update::Update;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let (client, _) = ferogram::Client::quick_connect(
"my.session",
12345,
"0123456789abcdef0123456789abcdef",
)
.await?;
let mut stream = client.stream_updates();
while let Some(upd) = stream.next().await {
if let Update::NewMessage(_msg) = upd {
let result = client
.invoke(
&functions::account::RegisterDevice {
no_muted: false,
token_type: 0_i32,
token: "".to_string(),
app_sandbox: false,
secret: vec![],
other_uids: vec![],
},
)
.await?;
println!("{result:?}");
}
}
Ok(())
}