Rust
Rust
Yousign: Download File
See more Yousign Examples
Downloads a previously uploaded Yousign file.Chilkat Rust Downloads
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
let http = chilkat::Http::new();
// Adds the "Authorization: Bearer YOUR_API_KEY" header.
http.set_auth_token("YOUR_API_KEY");
let download_url = "https://staging-api.yousign.com/files/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/download?alt=media".to_string();
let local_file_path = "qa_output/x.pdf".to_string();
if http.download(&download_url, &local_file_path).is_err() {
println!("{}", http.last_error_text());
return;
}
println!("The PDF file is downloaded...");