proton URL

protonURL

安全で機密性の高い共有

🎄 ホリデー特集

シークレットサンタを開催しよう。
誰ものぞき見できません。

名前を入力すると、抽選を行い、参加者ごとに protonURL リンクを1つ作成します。各自が自分のリンクを1回だけ開き、誰にプレゼントを贈るかを確認…そしてメッセージは自動で消えます。

無料の抽選、登録不要

1行に1人ずつ、3〜30人まで。
1行に1組、カンマで区切ります。例:Alice, Bob
予算、日時、場所など。すべてのリンクに追加されます。

🔒 抽選と暗号化はお使いのブラウザ内で行われます。私たちが受け取るのは読むことのできない暗号化されたメッセージだけで、名前や組み合わせは届きません。

使い方

  1. 1

    名前を入力

    参加者を追加し、必要に応じて互いに当たってはいけない人(カップルなど)を指定します。

  2. 2

    抽選します

    全員をランダムなプレゼントの輪に並べ、参加者ごとに暗号化された protonURL リンクを作成します。

  3. 3

    リンクを送る

    各自が SMS、WhatsApp、メールでリンクを受け取ります。読まれるとメッセージは破棄されます。

🕵️ 誰かがのぞき見しようとしたら?

protonURL のリンクは1回しか開けません。主催者(または誰か)が他人のリンクを開くと、本来の受け取り手には開封済みのリンクが届くため、ズルはすぐにバレます。その場合は抽選をやり直すだけです。

従来のシークレットサンタの困りごと

📝

紙のくじ

全員が同じ場所に集まる必要があり、決まって誰かが自分の名前を引いてしまいます。

🙈

主催者には全部バレバレ

抽選した人はすべての組み合わせを知っています。その人にはサプライズがありません。

📧

専用アプリ

アカウント作成、メールアドレスの収集、広告…いくつか名前を引くだけなのに。

🔒 主催者にも本当に秘密

  • 🙅 「すべて表示」ボタンなし

    組み合わせは誰にも表示されません。主催者に見えるのはリンクだけで、引かれた名前は見えません。

  • 🤖 AIなし

    名前のリストが AI サービスに送信されることはありません。

  • 🚫 アカウント不要

    登録不要、メールアドレス不要、広告なし。開かれなかったリンクは1か月後に削除されます。

「シークレットサンタの開催にちょうど使いました!求めていた通りで、うまくいきました。自分にも秘密なのがいいですね。」
— Mat(protonURL API の初期ユーザー)

🔍 慎重派の方へ

抽選を私たちに任せたくないですか?

ご自身のパソコンで実行できます。スクリプトは短く読みやすく、抽選は当社のサーバーではなくあなたのマシン上で行われます。protonURL は、通常のリンクと同じく、暗号化された各メッセージを保存するだけです。

  1. 無料の API キーを取得(月20回まで、クレジットカード不要)。
  2. スクリプトをダウンロードし、キー、参加者、メッセージを入力します。
  3. python3 secret-santa.py を実行すると、参加者ごとにリンクが1つ作成されます。
#!/usr/bin/env python3
"""
Secret Santa with protonURL — https://protonurl.com/secret-santa.html

Draws names and creates one self-destructing link per participant.
Nobody, not even the organiser, knows who got whom: each person opens
their own link once, and the message is destroyed right after.

Requirements: Python 3.8+, no extra package.
Usage: edit the settings below, then run `python3 secret-santa.py`
"""

import json
import random
import sys
import urllib.error
import urllib.request

# ── Settings ────────────────────────────────────────────────────────────────

API_KEY = "YOUR_API_KEY"  # Free key (20 calls/month): https://protonurl.com/free-trial.html

PARTICIPANTS = ["Alice", "Bob", "Charlie", "Diana", "Eve"]

# Optional: people who must not draw each other (couples, roommates…)
EXCLUSIONS = [
    ("Alice", "Bob"),
]

MESSAGE = (
    "🎅 Hi {giver}!\n\n"
    "You are {receiver}'s Secret Santa! 🎁\n"
    "You're the one buying them a gift.\n\n"
    "Keep it secret 🤫 This message has now self-destructed: "
    "write the name down or take a screenshot, you won't be able to read it again.\n\n"
    "🎄 Run your own Secret Santa: https://protonurl.com/secret-santa.html"
)

DURATION_HOURS = 744  # Unopened links expire after 1 month. Allowed: 1, 72, 168, 744, 4464, 8760

# ── Script ──────────────────────────────────────────────────────────────────

API_URL = "https://api.protonurl.com"
ALLOWED_DURATIONS = (1, 72, 168, 744, 4464, 8760)


def api_call(method, path, payload=None):
    request = urllib.request.Request(
        API_URL + path,
        data=json.dumps(payload).encode() if payload is not None else None,
        method=method,
        headers={
            "Authorization": "Bearer " + API_KEY,
            "Content-Type": "application/json",
        },
    )
    try:
        with urllib.request.urlopen(request, timeout=30) as response:
            return json.load(response)
    except urllib.error.HTTPError as error:
        sys.exit(f"API error {error.code}: {error.read().decode(errors='replace')}")


def draw(people, exclusions, attempts=10_000):
    """Shuffle everyone into a single gift circle, so nobody draws themselves."""
    rng = random.SystemRandom()
    forbidden = {frozenset(pair) for pair in exclusions}
    for _ in range(attempts):
        circle = people[:]
        rng.shuffle(circle)
        pairs = [(circle[i], circle[(i + 1) % len(circle)]) for i in range(len(circle))]
        if not any(frozenset(pair) in forbidden for pair in pairs):
            return pairs
    sys.exit("No valid draw found: there are too many exclusions.")


def main():
    if API_KEY == "YOUR_API_KEY":
        sys.exit("Set your API key first: https://protonurl.com/free-trial.html")
    if len(PARTICIPANTS) < 3:
        sys.exit("You need at least 3 participants.")
    if len(set(PARTICIPANTS)) != len(PARTICIPANTS):
        sys.exit("Each participant name must be unique.")
    if type(DURATION_HOURS) is not int or DURATION_HOURS not in ALLOWED_DURATIONS:
        sys.exit(f"DURATION_HOURS must be one of {ALLOWED_DURATIONS}.")

    # Check the quota first, so the draw never stops halfway (this check uses 1 call)
    remaining = api_call("GET", "/quota").get("remaining")
    if remaining is not None and remaining < len(PARTICIPANTS):
        sys.exit(f"Only {remaining} API calls left this month, "
                 f"{len(PARTICIPANTS)} needed: https://protonurl.com/pricing.html")

    pairs = draw(PARTICIPANTS, EXCLUSIONS)

    print("Send each person their own link (and only theirs!):\n")
    for giver, receiver in sorted(pairs):
        link = api_call("POST", "/create", {
            "text": MESSAGE.format(giver=giver, receiver=receiver),
            "duration": DURATION_HOURS,
        })["url"]
        print(f"  {giver:<20} {link}")

    print("\nEach link works only once. If someone says theirs was already opened,")
    print("somebody peeked: just run the script again for a fresh draw.")


if __name__ == "__main__":
    main()

無料キーでは、最大 19人の参加者まで抽選できます(スクリプトは開始前に1回呼び出して残り回数を確認します)。もっと大人数なら、API Pro プランで月1,000回まで利用できます。