Skip to content
Get started

Download document file content

client.Documents.Download(ctx, id) (*Response, error)
get/documents/{id}/download

Download the binary content of the document file

ParametersExpand Collapse
id string
ReturnsExpand Collapse
type DocumentDownloadResponse interface{…}
Download document file content
package main

import (
  "context"
  "fmt"

  "github.com/withluminary/go-sdk"
  "github.com/withluminary/go-sdk/option"
)

func main() {
  client := withluminary.NewClient(
    option.WithClientID("My Client ID"),
    option.WithClientSecret("My Client Secret"),
  )
  response, err := client.Documents.Download(context.TODO(), "id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response)
}
Returns Examples