Xbase++
Xbase++
Yousign: Download File
See more Yousign Examples
Downloads a previously uploaded Yousign file.Chilkat Xbase++ Downloads
LOCAL nSuccess
LOCAL oHttp
LOCAL cDownloadUrl
LOCAL cLocalFilePath
nSuccess := 0
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
oHttp := CreateObject("Chilkat.Http")
// Adds the "Authorization: Bearer YOUR_API_KEY" header.
oHttp:AuthToken := "YOUR_API_KEY"
cDownloadUrl := "https://staging-api.yousign.com/files/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/download?alt=media"
cLocalFilePath := "qa_output/x.pdf"
nSuccess := oHttp:Download(cDownloadUrl, cLocalFilePath)
IF (nSuccess == 0)
? oHttp:LastErrorText
oHttp:destroy()
RETURN
ENDIF
? "The PDF file is downloaded..."
oHttp:destroy()