Sample code for 30+ languages & platforms
Go

Yousign: Download File to Memory

See more Yousign Examples

Downloads a previously uploaded Yousign file (PDF) to memory.

Chilkat Go Downloads

Go
    success := false

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

    http := chilkat.NewHttp()

    // Adds the "Authorization: Bearer YOUR_API_KEY" header.
    http.SetAuthToken("YOUR_API_KEY")

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

    pdfData := chilkat.NewBinData()
    success = http.DownloadBd(downloadUrl,pdfData)
    if success == false {
        fmt.Println(http.LastErrorText())
        http.DisposeHttp()
        pdfData.DisposeBinData()
        return
    }

    // Your application may now access the data contained in "pdfData".

    fmt.Println("Success")

    http.DisposeHttp()
    pdfData.DisposeBinData()