---
title: Claude Platform OAuth
url: https://platform.claude.com/docs/zh-TW/manage-claude/oauth-apps/overview
description: Claude Platform OAuth 與 Linked billing 的入門起點，以及客戶的核准如何傳達至您的後端。
---

<Warning>
  Claude Platform OAuth 是一項 Beta Service：依據您與 Anthropic 之間的協議（例如[商業服務條款](https://www.anthropic.com/legal/commercial-terms)）以及[特定服務條款](https://www.anthropic.com/legal/service-specific-terms)所提供的預發布軟體。在 Beta 期間，端點、參數與行為可能會變更。它可能不適合用於正式環境。
</Warning>

Claude Platform OAuth 是客戶核准您的產品使用其 Claude 組織的方式。它為 [Linked billing](https://platform.claude.com/docs/zh-TW/manage-claude/oauth-apps/linked-billing) 提供支援，讓您的客戶透過自己的 Claude 組織支付您產品中的 Claude 用量。若要使用您組織的憑證為您自己的產品呼叫 Claude，您不需要 OAuth 應用程式：請參閱[身份驗證](https://platform.claude.com/docs/zh-TW/manage-claude/authentication)。

若要提供 Linked billing，您需要一個 OAuth 應用程式，以及一個向您的後端核發權杖的[身分提供者](https://platform.claude.com/docs/zh-TW/manage-claude/oauth-apps/overview#no-client-secret)。您的客戶需要一個直接向 Anthropic 付款的 Claude 組織：請參閱[符合資格的客戶](https://platform.claude.com/docs/zh-TW/manage-claude/oauth-apps/linked-billing#eligible-customers)。

## 運作方式

客戶只需核准您的應用程式一次。這會建立一條連線，將其 Claude 組織與您的應用程式綁定，直到客戶或您終止為止。

您客戶公司中的使用者點擊您產品中的 [Link your Claude organization 按鈕](https://platform.claude.com/docs/zh-TW/manage-claude/oauth-apps/linked-billing/link-button)。您的後端會將他們導向 `auth.claude.com` 上 Claude 的核准頁面。如果他們在客戶的組織中具有Admin 或 Billing 角色，就能核准您的應用程式，接著瀏覽器會帶著一次性代碼返回。您的後端會以該代碼交換連線的 ID 與 OAuth 權杖。之後，Anthropic 即可就您的後端為客戶發出的請求，向客戶的組織計費。

<Frame>
  ![循序圖：使用者在 auth.claude.com 核准您的應用程式，接著您的後端交換一次性代碼](https://platform.claude.com/docs/zh-TW/images/linked-billing-round-trip.svg)
</Frame>

不具備上述任一角色的人無法核准：請參閱[您的客戶會看到什麼](https://platform.claude.com/docs/zh-TW/manage-claude/oauth-apps/linked-billing/what-your-customers-see#approving-the-link)。如果您熟悉 OAuth，這就是搭配 PKCE 的授權碼流程。

### 您的 OAuth 應用程式

您的 OAuth 應用程式是您的產品在 Anthropic 的註冊。由您 Claude 組織的管理員在 Claude Console 中建立，它會為您的產品提供一個用戶端 ID。在核准頁面上，客戶會看到它的名稱、標誌，以及它所要求的內容。

### 以身分提供者取代用戶端密鑰

您的後端傳送至 `auth.claude.com` 的每個請求，都會透過[工作負載身分聯合](https://platform.claude.com/docs/zh-TW/manage-claude/workload-identity-federation)攜帶來自您身分提供者的權杖。Anthropic 不會為 OAuth 應用程式核發用戶端密鑰。任何 OpenID Connect 簽發者皆可使用，並且提供[常見身分提供者的指南](https://platform.claude.com/docs/zh-TW/manage-claude/workload-identity-federation#identity-providers)。

## 選擇您的路徑

從您目前要處理的工作開始。若要建置整合，請[設定您的應用程式](https://platform.claude.com/docs/zh-TW/manage-claude/oauth-apps/linked-billing/set-up-your-app)、[連結並向測試客戶計費](https://platform.claude.com/docs/zh-TW/manage-claude/oauth-apps/linked-billing/link-and-bill-a-customer)，然後[測試並發布您的應用程式](https://platform.claude.com/docs/zh-TW/manage-claude/oauth-apps/linked-billing/test-and-publish)。在您的應用程式上線之前，只有其測試使用者能連結它，因此請先[新增您測試客戶的核准者](https://platform.claude.com/docs/zh-TW/manage-claude/oauth-apps/linked-billing/test-and-publish#add-test-users)。

<CardGroup cols={2}>
  <Card title="Linked billing" icon="coins" href="https://platform.claude.com/docs/zh-TW/manage-claude/oauth-apps/linked-billing">
    判斷 Linked billing 是否適合您的產品與客戶
  </Card>

  <Card title="為 Linked billing 設定您的應用程式" icon="settings" href="https://platform.claude.com/docs/zh-TW/manage-claude/oauth-apps/linked-billing/set-up-your-app">
    註冊您的應用程式，接著連結並向客戶計費
  </Card>

  <Card title="管理已連結的客戶" icon="list" href="https://platform.claude.com/docs/zh-TW/manage-claude/oauth-apps/linked-billing/manage-customers">
    支援已連結的客戶、檢查他們是否仍保持連結，或重新連結他們
  </Card>

  <Card title="Linked billing 錯誤" icon="triangle-alert" href="https://platform.claude.com/docs/zh-TW/manage-claude/oauth-apps/linked-billing/errors">
    修正連結或計費時傳回的錯誤
  </Card>

  <Card title="您的客戶會看到什麼" icon="browser" href="https://platform.claude.com/docs/zh-TW/manage-claude/oauth-apps/linked-billing/what-your-customers-see">
    適用於產品與支援團隊：您的客戶會看到的核准頁面、支出上限與電子郵件
  </Card>

  <Card title="OAuth 端點與參數" icon="book" href="https://platform.claude.com/docs/zh-TW/manage-claude/oauth-apps/endpoints-and-parameters">
    查詢確切的端點、參數、範圍、OAuth 權杖欄位或錯誤
  </Card>
</CardGroup>
