---
title: "安全分享 API Key：发给开发者的方法"
url: https://uselinkpilot.com/zh/share-api-keys-securely
description: "如何安全分享 API Key：限定密钥权限，用查看一次即销毁的一次性链接发送，然后轮换。整个 .env 文件也适用。"
lang: zh-Hans
---

# 如何安全分享 API Key

限定密钥权限，用会销毁的链接只发送一次，并定期轮换。

## 操作步骤

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 命令创建链接；如果有人已经把密钥直接粘贴了出来，消息快捷操作可以把它转成私密链接，原消息随后即可删除。

## 分享 .env 文件或配置

整个 `.env` 文件就是文本，可以原样放进表单。如果文件必须逐字节保持不变，比如服务账号 JSON 或证书，就用免费账号把它作为附件添加；附件在您的浏览器中加密，第一次下载后即销毁。需要用脚本完成这一步的开发者，可以用 CLI、SDK 和 MCP 服务器 (https://uselinkpilot.com/developers)，在终端或 AI 助手中创建同样加密的机密信息。

## 一次性链接不能替代什么

它负责的是交付，不是存储。密钥应保存在密钥管理服务或平台的环境变量设置中；一次性链接只负责把密钥从生成它的人手里交到需要它的人手里，只交一次，中间不留副本。

## 常见问题

### 在 Slack 里用链接发送 API 密钥安全吗？

### 能把密钥分享给公司以外的人吗？

### 生产环境的密钥应该分享吗？

### 这个过程能自动化吗？

Pro 套餐每月 $29，可为每条机密信息设置口令、自定义过期日期和时间，并提供审计时间线，记录每一次查看、销毁和撤销。 查看套餐 (https://uselinkpilot.com/pricing).

## 相关内容

- 安全分享账号密码: https://uselinkpilot.com/zh/share-credentials-securely
- 团队共享密码的最佳方式: https://uselinkpilot.com/zh/share-passwords-with-team
- 安全发送密码: https://uselinkpilot.com/zh/send-password-securely
- 面向开发者的 CLI、SDK 和 API: https://uselinkpilot.com/developers

全部使用场景: https://uselinkpilot.com/zh/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/use-cases"
      },
      {
        "@type": "ListItem",
        "position": 3,
        "name": "如何安全分享 API Key",
        "item": "https://uselinkpilot.com/zh/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-Hans"
  },
  {
    "@context": "https://schema.org",
    "@type": "HowTo",
    "name": "如何安全分享 API Key",
    "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-Hans"
  },
  {
    "@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"
    }
  }
]
```