Buckets

ICBucket

ICPay Cloud guide

On-chain encrypted file storage

New bucketPricingGitLab
HomeIntroductionQuick StartInstallationConfigurationAuthenticationBasic UsageBest PracticesAPI OverviewAPI EndpointsAPI RequestsAPI ResponsesError CodesError HandlingTroubleshootingLocal DevelopmentProduction DeploymentConfiguration ReferenceTypes ReferenceChangelogFrequently Asked Questions
ICBucket

On-chain encrypted file storage

Overview

IntroductionQuick StartInstallation

Guides

ConfigurationAuthenticationBasic UsageBest Practices

API Reference

API OverviewAPI EndpointsAPI RequestsAPI Responses

Errors

Error CodesError HandlingTroubleshooting

Deployment

Local DevelopmentProduction Deployment

Reference

Configuration ReferenceTypes ReferenceChangelog

FAQ

Frequently Asked Questions
ICPay

© 2026 ICPay. All rights reserved.

contact@icpay.cloud

Products

  • ICFalcon
  • ICBucket
  • Canisters
  • Top up cycles
  • ICPay Wallet

Explore

  • Channels
  • Blog

Resources

  • Falcon CLI
  • ICP-Hub Packages
  • ICBucket Docs
  • Blog

Company

  • Charity
  • About
  • FAQ
  • Roadmap

Legal

  • Brands
  • Terms
  • Privacy
  • Transparency

Community

  • GitLab
  • X
  • LinkedIn
  • Discord
  • Support
ICPayICPay
  • Blog
Buckets

ICBucket

ICPay Cloud guide

On-chain encrypted file storage

New bucketPricingGitLab
HomeIntroductionQuick StartInstallationConfigurationAuthenticationBasic UsageBest PracticesAPI OverviewAPI EndpointsAPI RequestsAPI ResponsesError CodesError HandlingTroubleshootingLocal DevelopmentProduction DeploymentConfiguration ReferenceTypes ReferenceChangelogFrequently Asked Questions
ICBucket

On-chain encrypted file storage

Overview

IntroductionQuick StartInstallation

Guides

ConfigurationAuthenticationBasic UsageBest Practices

API Reference

API OverviewAPI EndpointsAPI RequestsAPI Responses

Errors

Error CodesError HandlingTroubleshooting

Deployment

Local DevelopmentProduction Deployment

Reference

Configuration ReferenceTypes ReferenceChangelog

FAQ

Frequently Asked Questions

Guides

Authentication

Authenticate API requests using API keys, Internet Identity delegations, or agent principals.

Authentication

ICBucket supports two primary authentication modes:

  1. API Keys: Lightweight bearer tokens intended for backend servers, worker processes, and automated CI pipelines.
  2. Internet Identity Delegations: Cryptographically signed delegations from @dfinity/identity for direct in-browser client uploads.

Prerequisites

  • An active ICPay account with Internet Identity login
  • Access to the API Keys Manager in your dashboard

Steps

Option A: API Key Authentication (Recommended for Backends)

Generate a Read/Write or Read-Only API key from the ICPay dashboard:

import { ICBucket } from "icpay-bucket"

const bucket = new ICBucket({
  bucketId: "my-assets",
  apiKey: "icp_live_sec_f98234...",
})

Option B: Internet Identity Delegation (Browser dApps)

Pass the user's @dfinity/auth-client identity directly to the client:

import { ICBucket } from "icpay-bucket"
import { AuthClient } from "@dfinity/auth-client"

const authClient = await AuthClient.create()
const identity = authClient.getIdentity()

const bucket = new ICBucket({
  bucketId: "my-assets",
  identity, // User's on-chain principal
})

Security Best Practices

  • Never expose Secret API Keys in client-side bundles: Use Internet Identity delegation or sign short-lived pre-authenticated upload sessions on your backend.
  • Rotate Compromised Keys: You can instantly revoke and re-issue API keys with zero canister downtime from the dashboard.

Verification

Test that your credentials validate against the backend canister:

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://cdn.icpay.app/cloud/my-assets/auth-test

Related Pages

  • Configuration
  • Basic Usage
  • Error Codes
PreviousConfigurationNextBasic Usage

On this page

PrerequisitesStepsOption A: API Key Authentication (Recommended for Backends)Option B: Internet Identity Delegation (Browser dApps)Security Best PracticesVerificationRelated Pages
HomeIntroductionQuick StartInstallationConfigurationAuthenticationBasic UsageBest PracticesAPI OverviewAPI EndpointsAPI RequestsAPI ResponsesError CodesError HandlingTroubleshootingLocal DevelopmentProduction DeploymentConfiguration ReferenceTypes ReferenceChangelogFrequently Asked Questions
HomeIntroductionQuick StartInstallationConfigurationAuthenticationBasic UsageBest PracticesAPI OverviewAPI EndpointsAPI RequestsAPI ResponsesError CodesError HandlingTroubleshootingLocal DevelopmentProduction DeploymentConfiguration ReferenceTypes ReferenceChangelogFrequently Asked Questions
ICBucket

On-chain encrypted file storage

Overview

IntroductionQuick StartInstallation

Guides

ConfigurationAuthenticationBasic UsageBest Practices

API Reference

API OverviewAPI EndpointsAPI RequestsAPI Responses

Errors

Error CodesError HandlingTroubleshooting

Deployment

Local DevelopmentProduction Deployment

Reference

Configuration ReferenceTypes ReferenceChangelog

FAQ

Frequently Asked Questions