SDKs

Encrypt locally, share once, in four languages

The Konfidant SDKs encrypt text and files on your machine with AES-256-GCM, upload only ciphertext, and build the one-time link with the key in its URL fragment. A few lines of code, and the API never sees plaintext.

API access is included on Premium and Enterprise.

Same model in every language

Client-side encryption

Each SDK implements the KNF1 format: a fresh 256-bit key per share and AES-256-GCM, done locally.

Text and files

Share a string in one call, or upload a file through a presigned URL and get its link when the upload completes.

Your API key, your limits

Use scoped test and live keys from your dashboard, each with its own rate limit and usage tracking.

Node.jsSource
$ npm install @konfidant/sdk

import { KonfidantClient } from '@konfidant/sdk';

const client = new KonfidantClient({
  apiKey: process.env.KONFIDANT_API_KEY,
});

// Encrypted locally; the key only goes into the link
const { shareUrl } = await client.shareText('DB_PASSWORD=s3cr3t', {
  ttlHours: 24,
});
PythonSource
$ pip install konfidant

import os
from konfidant import KonfidantClient

client = KonfidantClient(api_key=os.environ["KONFIDANT_API_KEY"])

result = client.share_text("DB_PASSWORD=s3cr3t", ttl_hours=24)
print(result.share_url)
$ go get github.com/konfidant/sdk-go

client, err := konfidant.New(konfidant.ClientOptions{
    APIKey: os.Getenv("KONFIDANT_API_KEY"),
})

result, err := client.ShareText(
    ctx, "DB_PASSWORD=s3cr3t",
    konfidant.ShareOptions{
      TTLHours: 24,
})
fmt.Println(result.ShareURL)
RubySource
$ gem install konfidant

require 'konfidant'

client = Konfidant::Client.new(api_key: ENV['KONFIDANT_API_KEY'])

result = client.share_text(
  text: 'DB_PASSWORD=s3cr3t',
  ttl_hours: 24
)
puts result.share_url

Install

Each SDK is open source on GitHub:

  • JavaScript and TypeScript: npm install @konfidant/sdk
  • Python: pip install konfidant
  • Go: go get github.com/konfidant/sdk-go
  • Ruby: gem install konfidant

Where the key goes

The API returns a download URL with the single-use token. The SDK appends the decryption key to the URL fragment locally, so the full link exists only on your side until you send it. Store it like any other secret until it reaches the recipient.

FAQ

Frequently asked questions

Are the SDKs open source?

Yes. The JavaScript, Python, Go and Ruby SDKs are on GitHub under the konfidant organization.

Can I use the API without an SDK?

Yes. Encrypt the content in the KNF1 format described in the docs and call the REST API over HTTPS.

Do the SDKs support files?

Yes. Files are encrypted locally and uploaded through a presigned URL; the SDK completes the upload and returns the one-time link.

Not ready to decide yet?

Get product updates and new articles on sharing secrets safely. No spam, unsubscribe anytime.

We'll email you a link to confirm. Protected by Cloudflare Turnstile. See our Privacy Policy.

Ship one-time links from your own code.

Free plan. No credit card. First encrypted link in under a minute.