Skip to content
Start here

Retrieves a file from Binary Storage

client.CloudforceOne.BinaryStorage.Get(ctx, hash, query) error
GET/accounts/{account_id}/cloudforce-one/binary/{hash}

Retrieves a file from Binary Storage

Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
Cloudforce One WriteCloudforce One Read
ParametersExpand Collapse
hash string

hash of the binary

query BinaryStorageGetParams
AccountID param.Field[string]

Account ID.

Retrieves a file from Binary Storage

package main

import (
  "context"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/cloudforce_one"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  err := client.CloudforceOne.BinaryStorage.Get(
    context.TODO(),
    "hash",
    cloudforce_one.BinaryStorageGetParams{
      AccountID: cloudflare.F("account_id"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
}
Returns Examples