콘텐츠로 건너뛰기

클라이언트 라이브러리

공식 클라이언트는 onetime-ruby입니다. 이 클라이언트는 API v1과 v2, 모든 지역 도메인, 그리고 사용자 지정 기본 URL을 지원합니다.

이 페이지의 나머지 라이브러리는 모두 커뮤니티에서 유지 관리합니다. 대부분은 API v2와 지역 도메인이 도입되기 전에 만들어졌기 때문에 일반적으로 onetimesecret.com의 더 이상 권장되지 않는 v1 엔드포인트를 호출합니다. 각 항목의 상태 안내를 확인하고, 라이브러리에 의존하기 전에 사용 중인 지역이나 자체 호스팅 인스턴스에서 실제로 동작하는지 검증하세요.

언어 라이브러리 최근 활동¹ 지역 / 사용자 지정 도메인
Ruby onetime-ruby (공식) 2026-06 ✅ 모든 지역 + 사용자 지정 기본 URL
Go go-onetimesecret 2026-05 US 호스트
Python onetimesecret-cli 2024-11 US / EU 지역 옵션
Go otsgo 2024-03 문서화되지 않음
PowerShell OneTimeSecret 2021-06 사용자 지정 기본 URL
Bash onetimesecret-bash 2020-05 사용자 지정 호스트
Python py_onetimesecret 2019-05 ❌ (Python 2 시대)
C# OneTimeSharp 2018-05 ❌
Java onetime-java 2014-06 자체 호스팅 URL만 지원
Perl Net::OneTimeSecret 2012-02 ❌

¹ 마지막 점검 시점(2026-07) 기준 가장 최근의 커밋 또는 릴리스입니다.

GitHub 페이지 - onetime-ruby 작성자 Delano — 공식 클라이언트, 활발히 유지 관리 중 (최근 커밋 2026-06). API v1(더 이상 권장되지 않음)과 v2, 지역 도메인, 사용자 지정 기본 URL을 지원합니다. Ruby 3.1 이상이 필요하며 런타임 의존성이 없습니다.

require 'onetime/api'
api = Onetime::API.new('YOUR_EMAIL', 'YOUR_OTS_APIKEY')
options = {
secret: 'Jazz, jazz and more jazz.',
recipient: 'example@onetimesecret.com',
ttl: 7200
}
ret = api.post('/share', options)
puts ret['secret_key']

GitHub 페이지 - onetimesecret-cli 작성자 slashpass — 커뮤니티에서 유지 관리 (최근 커밋 2024-11). 지역 옵션(us / eu)을 지원합니다.

from onetimesecret import OneTimeSecretCli
cli = OneTimeSecretCli(ONETIMESECRET_USER, ONETIMESECRET_KEY)
cli.create_link("secret") # return a link like https://onetimesecret.com/secret/xxxxxxxxxxx

GitHub 페이지 - py_onetimesecret 작성자 Vladislav Stepanov — 유지 관리 중단 (최근 커밋 2019, 아래 예시는 Python 2 코드입니다). onetimesecret.com의 더 이상 권장되지 않는 v1 API만 사용합니다.

from onetimesecret import OneTimeSecret
o = OneTimeSecret("YOUR_EMAIL", "YOUR_OTS_APIKEY")
secret = o.share(u"test")
print o.retrieve_secret(secret["secret_key"])
# {u'secret_key': u'dtr7ixukiolpx1i4i87kahmhyoy2q65',
# u'value': u'test'}

CPAN의 Net::OneTimeSecret 작성자 Kyle Dawkins — 유지 관리 중단 (최근 릴리스 0.04, 2012-02). API v2와 지역 도메인 도입 이전에 만들어졌습니다.

#!/usr/bin/env perl
use Net::OneTimeSecret;
# Note: replace these with yours in order for this to work!
my $customerId = 'YOUR_EMAIL';
my $testApiKey = 'YOUR_OTS_APIKEY';
my $api = Net::OneTimeSecret->new( $customerId, $testApiKey );
my $result = $api->shareSecret( 'Jazz, jazz and more jazz.',
passphrase => 'thepassword',
recipient => 'kyle@shoffle.com',
ttl => 7200,
);
printf( "%s\n", $result->{secret_key} );
my $secret = $api->retrieveSecret( $result->{secret_key}, passphrase => "thepassword" );
printf( "%s\n", $secret->{value} );

GitHub 페이지 - onetime-java 작성자 Marcin Pawlowski — 유지 관리 중단 (최근 커밋 2014-06). 인스턴스 URL을 받으므로 자체 호스팅 환경에서는 동작할 수 있지만, API v2 도입 이전에 만들어졌습니다.

OneTimeSecret ots = new OneTimeSecretRestImpl(
"https://path/to/ots/instance",
"ots-username",
"ots-apikey");
GenerateResponse generateResponse = ots.generate(
new GenerateRequest.Builder()
.withPassphrase("supersecret")
.build());
RetrieveResponse retrieveResponse = ots.retrieve(
new RetrieveRequest.Builder()
.withSecretKey(generateResponse.getSecretKey())
.withPassphrase("supersecret")
.build());
assertEquals(generateResponse.getValue(), retrieveResponse.getValue());

GitHub 페이지 - OneTimeSharp 작성자 Vladislav Stepanov — 유지 관리 중단 (최근 커밋 2018-05). onetimesecret.com의 더 이상 권장되지 않는 v1 API만 사용합니다.

// You can use OneTimeSharp in any of your projects which are compatible with .NET (4.0+) or Mono (2.10.8+).
using VStepanov.OneTimeSharp;
class Test
{
static void Main(string[] args)
{
var ots = new OneTimeSecret("YOUR_EMAIL", "YOUR_OTS_APIKEY");
var generated = ots.GenerateSecret();
Console.WriteLine(generated.Value); // LR*?us*A(UT*
Console.WriteLine(generated.SecretKey); // ikzx3m77j5by8411cg5lk5fvfylvl0i
Console.WriteLine(ots.GetSecretLink(generated)); // https://onetimesecret.com/secret/ikzx3m77j5by8411cg5lk5fvfylvl0i
var shared = ots.ShareSecret("Hello, OTS!");
Console.WriteLine(shared.MetadataKey); // kd6rgsucl98qbgu9eavjq4k5sdxsom0
Console.WriteLine(ots.GetMetadataLink(shared)); // https://onetimesecret.com/private/kd6rgsucl98qbgu9eavjq4k5sdxsom0
}
}

GitHub 페이지 - go-onetimesecret 작성자 Corbalt — 커뮤니티에서 유지 관리 (최근 커밋 2026-05, us.onetimesecret.com 호스트에 맞게 업데이트됨). CLI를 포함합니다.

import ots "github.com/corbaltcode/go-onetimesecret"
client := ots.Client{
Username: "user@example.com",
Key: "my api key",
}
metadata, err := client.Put("the launch codes", "passphrase", 0, "")
if err != nil {
// handle error
}
secret, err := client.Get(metadata.SecretKey, "passphrase")
if err != nil {
// handle error
}
// prints "the launch codes"
print(secret)
터미널 창
$ go install github.com/corbaltcode/go-onetimesecret/cmd/ots@latest
$ ots put 'what is essential is invisible to the eye'
hdjk6p0ozf61o7n6pbaxy4in8zuq7sm ifipvdpeo8oy6r8ryjbu8y7rhm9kty9
$ ots get hdjk6p0ozf61o7n6pbaxy4in8zuq7sm
what is essential is invisible to the eye
$ ots gen
rVjbS$twCJkS 4nwhy7v4fnabayqc5auv4ogh0nfr20 flsdlaun6hwczqu9utmc0vts5xj9xu1
$ ots burn flsdlaun6hwczqu9utmc0vts5xj9xu1
flsdlaun6hwczqu9utmc0vts5xj9xu1

GitHub 페이지 - otsgo 작성자 Emídio Neto — 커뮤니티에서 유지 관리 (최근 릴리스 v1.1.0, 2024-03). 지역 도메인 지원 여부는 문서화되지 않았습니다.

// Build a new client
client := ots.NewClient(
WithUsername("otsuser@domain.com"),
WithApiKey("xxxxxxxx"),
)
// Send a request with context
ctx := context.Background()
response, err := client.GetStatus(ctx)
if err != nil {
panic(err)
}
fmt.Println(response.Status)

GitHub 페이지 - OneTimeSecret 작성자 Craig Gumbley — 유지 관리 중단 (최근 릴리스 2021-06). 사용자 지정 -BaseUrl을 지원하므로 특정 지역이나 자체 호스팅 인스턴스를 가리킬 수 있지만, API v2 도입 이전에 만들어졌습니다.

터미널 창
# Install from the PowerShell gallery
Install-Module -Name OneTimeSecret -Scope CurrentUser
# Set connection information
Set-OTSAuthorizationToken -Username user@mail.com -APIKey xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Generate a new shared secret
New-OTSSharedSecret -Secret "Very Secret" -Passphrase 1234 -Recipient user@mail.com
# Retrieve a secret
Get-OTSSecret -SecretKey qqevnp70b4uoiax4knzhwlhros6ne7x -Passphrase 1234
# View all functions that are available
Get-Command -Module OneTimeSecret | Select Name

GitHub 페이지 - onetimesecret-bash 작성자 Eric Engstrom — 유지 관리 중단 (최근 커밋 2020-05). ots_set_host를 통한 사용자 지정 호스트를 지원하지만, API v2와 지역 도메인 도입 이전에 만들어졌습니다.

스크립팅 API 사용 예시

“스크립팅 API 사용 예시” 섹션
터미널 창
# source for use anonymously (secrets created anonymously)
source ots.bash
# or, source with specific auth credentials
APIUSER="USERNAME"
APIKEY="APIKEY"
source ots.bash -u $APIUSER -k $APIKEY
# check status of server
ots_status
# create a secret and get back the URL
URL=$(echo "secret" | ots_share)
# share a multi line secret via HEREDOC.
URL=$(ots_share <<-EOF
This is a Secret
... on multiple lines
EOF
)
# pass options to share or generate.
URL=$(ots_share ttl=600 \
passphrase="shared-secret" \
recipient="someone@somewhere.com" <<< "SECRET")
# fetch the secret data
local DATA="$(ots_retrieve "$URL")"
# share/generate a new secret, and get back the private metadata key
local KEY=$(ots_metashare <<< "SECRET")
local KEY=$(ots_metagenerate)
# get a list of private metadata keys recently created.
# note that this requires valid authentication credentials
local -a RECENT=( $(ots_recent) )
# check on the current state of a secret, given the private key
ots_state $KEY
# burn a secret, given the private key
ots_burn $KEY
터미널 창
# Share a secret (from stdin)
./ots share
SECRET
^D
# Share a secret (via HEREDOC)
./ots share <<-EOF
This is a multi-line secret via HEREDOC.
Something else goes here.
EOF
# Get/Retrieve a secret:
./ots get <key|url>
./ots retrieve <key|url>
# Burn a secret, given its private metadata key:
./ots burn <key>