@backblaze-labs/b2-sdk - v0.1.0
    Preparing search index...

    Interface B2ClientOptions

    Configuration options for creating a B2Client.

    interface B2ClientOptions {
        accountInfo?: AccountInfo;
        allowedHostSuffixes?: readonly string[];
        applicationKey: string;
        applicationKeyId: string;
        realm?: string;
        retry?: Partial<RetryOptions>;
        transport?: HttpTransport;
        userAgent?: string;
    }
    Index

    Properties

    accountInfo?: AccountInfo

    Storage backend for authorization state. Defaults to InMemoryAccountInfo.

    allowedHostSuffixes?: readonly string[]

    Override the SSRF allow-list. By default the SDK locks the FetchTransport to host suffixes derived from the realm's authorize response (e.g. backblazeb2.com, backblaze.com) so a compromised B2 endpoint cannot redirect the SDK to internal services. Pass an explicit list to add hosts (e.g. when testing against a self-hosted proxy) or set to an empty array to disable the guard entirely (not recommended).

    Only consulted when B2ClientOptions.transport is unset; a custom transport is the user's responsibility to harden.

    applicationKey: string

    The application key secret.

    applicationKeyId: string

    The application key ID from the B2 dashboard or b2_create_key.

    realm?: string

    B2 realm to authenticate against. Defaults to "production".

    retry?: Partial<RetryOptions>

    Override retry behavior (max retries, backoff, jitter).

    transport?: HttpTransport

    Custom HTTP transport. Defaults to FetchTransport. Wrapped by RetryTransport.

    userAgent?: string

    Custom user-agent string prepended to the SDK default.