---
title: "安全分享 API 金鑰：交給開發人員的做法"
url: https://uselinkpilot.com/zh-hant/share-api-keys-securely
description: "安全分享 API 金鑰：限縮權限範圍，用看一次即銷毀的一次性連結傳送，再輪替金鑰。整個 .env 檔案也適用。"
lang: zh-Hant
---

# 如何安全分享 API 金鑰

限縮金鑰的權限範圍，透過一次即銷毀的連結傳送一次，再定期輪替。

## 操作步驟

1. 1
   ### 建立權限範圍只夠完成工作的金鑰
   大多數服務商都能把金鑰限制在特定權限、IP 或環境。限縮範圍的金鑰外洩時損害較小，也比較容易單獨撤銷。
2. 2
   ### 把金鑰貼進一次性連結
   使用下方的表單。金鑰會在您的瀏覽器中以 AES-GCM-256 加密，連結在首次開啟後即銷毀，聊天紀錄或電子郵件裡不會留下任何可用的內容。
3. 3
   ### 傳送連結；使用 Pro 方案時，通關密語改走另一個管道
   連結用 Slack、電子郵件或工單傳送都可以。若加上通關密語，請用電話告知，或改用其他管道。
4. 4
   ### 請開發人員把金鑰存進機密管理工具
   連結只能開啟一次。金鑰應該直接存進環境變數管理工具或密碼庫，絕不能放進版本控制系統或共用文件。
5. 5
   ### 定期輪替，有人離開時也要輪替
   把每把分享出去的金鑰都當成臨時金鑰。使用 Pro 方案時，稽核時間軸會顯示每個連結的開啟時間，整理輪替清單也就容易得多。

## 用一次性連結傳送

不需要帳號。Free 方案永久免費。

## 運作方式

1. 01
   ### 貼上密碼、金鑰或檔案
   內容在傳出之前就已在瀏覽器中加密。所有匿名機密連結都啟用閱後即焚。
2. 02
   ### 傳送連結
   只有一個網址。# 之後的金鑰留在瀏覽器裡，絕不會傳到我們的伺服器。
3. 03
   ### 儲存的機密內容已不存在
   首次開啟就會銷毀密文。之後任何人再開啟，看到的都是「內容已銷毀」頁面。

瀏覽器端加密於 2026 年 9 月 29 日上線。在此之前建立的機密內容，到期前都以明文儲存；檔案的名稱、大小和類型，我們至今仍看得到。 閱讀完整的安全模型 (https://uselinkpilot.com/security-architecture).

## 傳送 API 金鑰，不留在 Slack 裡

貼進頻道的 API 金鑰會隨工作區一起匯出、被搜尋功能納入索引，之後加入的每個人也都看得到。同一個頻道裡的一次性連結，開啟過後就不再有用。如果團隊用 Slack 工作，LinkPilot Slack 應用程式 (https://uselinkpilot.com/slack)可以用 /secret 指令建立連結；有人已經直接貼出 API key 時，訊息捷徑能把那則內容轉成機密連結，原本的訊息就可以刪除。

## 分享 .env 檔案或設定檔

整個 `.env` 檔案都是文字，可以原封不動貼進表單。若檔案必須保持位元組完全不變，例如服務帳號的 JSON 或憑證檔，請用免費帳號以附件傳送；檔案會在您的瀏覽器中加密，首次下載後即銷毀。需要用指令碼處理的開發人員，可以透過 CLI、SDK 和 MCP 伺服器 (https://uselinkpilot.com/developers)，從終端機或 AI 助理建立同樣加密的機密內容。

## 一次性連結取代不了什麼

一次性連結負責交付，不負責儲存。金鑰應該放在機密管理工具或平台的環境變數設定裡；一次性連結的用途，是把金鑰從產生它的人手上交給需要它的人，只交一次，中間不留任何副本。

## 常見問題

### 在 Slack 用連結傳送 API 金鑰安全嗎？

### 可以把金鑰分享給公司以外的人嗎？

### 正式環境的金鑰該分享嗎？

### 這個流程可以自動化嗎？

Pro 方案每月 $29 美元，每則機密內容都能加上通關密語，可自訂到期日期和時間，並提供稽核時間軸，記錄每次檢視、銷毀和撤銷。 查看方案 (https://uselinkpilot.com/pricing).

## 相關內容

- 安全分享帳號密碼: https://uselinkpilot.com/zh-hant/share-credentials-securely
- 團隊分享密碼的最佳方式: https://uselinkpilot.com/zh-hant/share-passwords-with-team
- 安全傳送密碼: https://uselinkpilot.com/zh-hant/send-password-securely
- 開發人員用的 CLI、SDK 和 API: https://uselinkpilot.com/developers

所有使用情境: https://uselinkpilot.com/zh-hant/use-cases

## Structured data

```json
[
  {
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "name": "首頁",
        "item": "https://uselinkpilot.com/"
      },
      {
        "@type": "ListItem",
        "position": 2,
        "name": "使用情境",
        "item": "https://uselinkpilot.com/zh-hant/use-cases"
      },
      {
        "@type": "ListItem",
        "position": 3,
        "name": "如何安全分享 API 金鑰",
        "item": "https://uselinkpilot.com/zh-hant/share-api-keys-securely"
      }
    ]
  },
  {
    "@context": "https://schema.org",
    "@type": "FAQPage",
    "mainEntity": [
      {
        "@type": "Question",
        "name": "在 Slack 用連結傳送 API 金鑰安全嗎？",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "安全，因為連結只顯示金鑰一次，之後即銷毀。留在 Slack 裡的訊息只會導向「內容已銷毀」通知。金鑰本身絕對不要直接貼進頻道。"
        }
      },
      {
        "@type": "Question",
        "name": "可以把金鑰分享給公司以外的人嗎？",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "可以。收件者只需要瀏覽器。請使用限縮權限的金鑰，連結設定較短的有效期限，合作結束時就輪替金鑰。"
        }
      },
      {
        "@type": "Question",
        "name": "正式環境的金鑰該分享嗎？",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "越少越好。最好使用服務商為每個人或每項服務個別核發的金鑰。非用共用金鑰不可時，透過一次性連結傳送一次，並定期輪替。"
        }
      },
      {
        "@type": "Question",
        "name": "這個流程可以自動化嗎？",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "可以。CLI 和 SDK 會先在您的電腦上加密機密內容再傳送，REST API 接收的就是它們產生的密文。每個方案都能建立 LinkPilot 本身的 API 金鑰，Free 方案也包括在內。"
        }
      }
    ],
    "inLanguage": "zh-Hant"
  },
  {
    "@context": "https://schema.org",
    "@type": "HowTo",
    "name": "如何安全分享 API 金鑰",
    "description": "限縮金鑰的權限範圍，透過一次即銷毀的連結傳送一次，再定期輪替。",
    "step": [
      {
        "@type": "HowToStep",
        "position": 1,
        "name": "建立權限範圍只夠完成工作的金鑰",
        "text": "大多數服務商都能把金鑰限制在特定權限、IP 或環境。限縮範圍的金鑰外洩時損害較小，也比較容易單獨撤銷。"
      },
      {
        "@type": "HowToStep",
        "position": 2,
        "name": "把金鑰貼進一次性連結",
        "text": "使用下方的表單。金鑰會在您的瀏覽器中以 AES-GCM-256 加密，連結在首次開啟後即銷毀，聊天紀錄或電子郵件裡不會留下任何可用的內容。"
      },
      {
        "@type": "HowToStep",
        "position": 3,
        "name": "傳送連結；使用 Pro 方案時，通關密語改走另一個管道",
        "text": "連結用 Slack、電子郵件或工單傳送都可以。若加上通關密語，請用電話告知，或改用其他管道。"
      },
      {
        "@type": "HowToStep",
        "position": 4,
        "name": "請開發人員把金鑰存進機密管理工具",
        "text": "連結只能開啟一次。金鑰應該直接存進環境變數管理工具或密碼庫，絕不能放進版本控制系統或共用文件。"
      },
      {
        "@type": "HowToStep",
        "position": 5,
        "name": "定期輪替，有人離開時也要輪替",
        "text": "把每把分享出去的金鑰都當成臨時金鑰。使用 Pro 方案時，稽核時間軸會顯示每個連結的開啟時間，整理輪替清單也就容易得多。"
      }
    ],
    "inLanguage": "zh-Hant"
  },
  {
    "@context": "https://schema.org",
    "@type": "SoftwareApplication",
    "@id": "https://uselinkpilot.com/#software",
    "name": "LinkPilot",
    "applicationCategory": "BusinessApplication",
    "operatingSystem": "Web",
    "description": "LinkPilot is a secure link management platform for creating branded short links, tracking engagement, and sharing secrets with expiring, protected, self-destructing links.",
    "url": "https://uselinkpilot.com",
    "offers": [
      {
        "@type": "Offer",
        "name": "Free",
        "price": "0",
        "priceCurrency": "USD",
        "url": "https://uselinkpilot.com/pricing"
      },
      {
        "@type": "Offer",
        "name": "Pro",
        "price": "29",
        "priceCurrency": "USD",
        "priceSpecification": {
          "@type": "UnitPriceSpecification",
          "price": "29",
          "priceCurrency": "USD",
          "billingDuration": "P1M"
        },
        "url": "https://uselinkpilot.com/pricing"
      },
      {
        "@type": "Offer",
        "name": "Agency",
        "price": "299",
        "priceCurrency": "USD",
        "priceSpecification": {
          "@type": "UnitPriceSpecification",
          "price": "299",
          "priceCurrency": "USD",
          "billingDuration": "P1M"
        },
        "url": "https://uselinkpilot.com/pricing"
      },
      {
        "@type": "Offer",
        "name": "Agency Plus",
        "price": "799",
        "priceCurrency": "USD",
        "priceSpecification": {
          "@type": "UnitPriceSpecification",
          "price": "799",
          "priceCurrency": "USD",
          "billingDuration": "P1M"
        },
        "url": "https://uselinkpilot.com/pricing"
      },
      {
        "@type": "Offer",
        "name": "Pro (yearly)",
        "price": "288",
        "priceCurrency": "USD",
        "priceSpecification": {
          "@type": "UnitPriceSpecification",
          "price": "288",
          "priceCurrency": "USD",
          "billingDuration": "P1Y"
        },
        "url": "https://uselinkpilot.com/pricing"
      },
      {
        "@type": "Offer",
        "name": "Agency (yearly)",
        "price": "2988",
        "priceCurrency": "USD",
        "priceSpecification": {
          "@type": "UnitPriceSpecification",
          "price": "2988",
          "priceCurrency": "USD",
          "billingDuration": "P1Y"
        },
        "url": "https://uselinkpilot.com/pricing"
      },
      {
        "@type": "Offer",
        "name": "Agency Plus (yearly)",
        "price": "7980",
        "priceCurrency": "USD",
        "priceSpecification": {
          "@type": "UnitPriceSpecification",
          "price": "7980",
          "priceCurrency": "USD",
          "billingDuration": "P1Y"
        },
        "url": "https://uselinkpilot.com/pricing"
      },
      {
        "@type": "Offer",
        "name": "Enterprise",
        "priceSpecification": {
          "@type": "PriceSpecification",
          "priceCurrency": "USD"
        },
        "url": "https://uselinkpilot.com/pricing"
      }
    ]
  },
  {
    "@context": "https://schema.org",
    "@type": "Organization",
    "@id": "https://uselinkpilot.com/#organization",
    "name": "LinkPilot",
    "alternateName": "LinkPilot by TetraCore",
    "url": "https://uselinkpilot.com",
    "contactPoint": {
      "@type": "ContactPoint",
      "contactType": "customer support",
      "email": "support@uselinkpilot.com",
      "url": "https://uselinkpilot.com/support"
    },
    "parentOrganization": {
      "@type": "Organization",
      "@id": "https://tetracorehq.com/#organization",
      "name": "TetraCore",
      "url": "https://tetracorehq.com/"
    },
    "logo": {
      "@type": "ImageObject",
      "url": "https://uselinkpilot.com/logo-512.png",
      "width": 512,
      "height": 512
    },
    "description": "LinkPilot is a secure link management platform for creating branded short links, tracking engagement, and sharing secrets with expiring, protected, self-destructing links.",
    "sameAs": [
      "https://x.com/uselinkpilot",
      "https://www.linkedin.com/company/uselinkpilot",
      "https://facebook.com/uselinkpilot",
      "https://github.com/TetraCoreHQ/linkpilot-cli",
      "https://github.com/TetraCoreHQ/linkpilot-mcp",
      "https://www.npmjs.com/package/linkpilot",
      "https://www.npmjs.com/package/@uselinkpilot/sdk",
      "https://www.npmjs.com/package/@uselinkpilot/mcp",
      "https://chromewebstore.google.com/detail/linkpilot-short-links-and/mnmppadihpcncicldpkmgknhnjkondad",
      "https://addons.mozilla.org/en-US/firefox/addon/uselinkpilot/"
    ]
  },
  {
    "@context": "https://schema.org",
    "@type": "WebSite",
    "name": "LinkPilot",
    "url": "https://uselinkpilot.com",
    "potentialAction": {
      "@type": "SearchAction",
      "target": "https://uselinkpilot.com/blog?q={search_term_string}",
      "query-input": "required name=search_term_string"
    }
  }
]
```