SignUp
---functions---
auth.signUp#aac7b717 no_joined_notifications:flags.0?true phone_number:string phone_code_hash:string first_name:string last_name:string = auth.Authorization
Returns
Parameters
| no_joined_notifications | true | optional |
| phone_number | string | required |
| phone_code_hash | string | required |
| first_name | string | required |
| last_name | string | required |
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::auth::SignUp {
no_joined_notifications: false,
phone_number: "".to_string(),
phone_code_hash: "".to_string(),
first_name: "First".to_string(),
last_name: "Last".to_string(),
},
)
.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::auth::SignUp {
no_joined_notifications: false,
phone_number: "".to_string(),
phone_code_hash: "".to_string(),
first_name: "First".to_string(),
last_name: "Last".to_string(),
},
)
.await?;
println!("{result:?}");
}
}
Ok(())
}