Sample code for 30+ languages & platforms
Tcl

Yousign: Download File

See more Yousign Examples

Downloads a previously uploaded Yousign file.

Chilkat Tcl Downloads

Tcl

load ./chilkat.dll

set success 0

# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.

set http [new_CkHttp]

# Adds the "Authorization: Bearer YOUR_API_KEY" header.
CkHttp_put_AuthToken $http "YOUR_API_KEY"

set downloadUrl "https://staging-api.yousign.com/files/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/download?alt=media"
set localFilePath "qa_output/x.pdf"

set success [CkHttp_Download $http $downloadUrl $localFilePath]
if {$success == 0} then {
    puts [CkHttp_lastErrorText $http]
    delete_CkHttp $http
    exit
}

puts "The PDF file is downloaded..."

delete_CkHttp $http