> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 公開 API クライアントの作成、設定、削除

> ABBYY Vantage UI で公開 API クライアントを作成、設定、削除できます。クライアントシークレット、リダイレクト URI、OAuth 2.0 フロー、トークンの有効期間を管理します。

連携アプリケーションが Vantage API への認証に使用する公開 API クライアントは、Vantage UI で作成、設定、削除できます。

<Note>
  公開 API クライアントを作成または管理できるのは、**Tenant Administrator** のみです。
</Note>

<div id="creating-a-public-api-client">
  ## 公開 API クライアントの作成
</div>

<Steps>
  <Step title="Configuration を開く">
    Vantage で、左ペインの **Configuration** をクリックします。
  </Step>

  <Step title="クライアントの作成を開始する">
    **Tenant Administration** ダイアログで、次のいずれかを行います。

    * **このテナントで最初のクライアントの場合:** **Create API Client** をクリックします。
    * **2 つ目以降のクライアントの場合:** **公開 API クライアント** をクリックし、**公開 API クライアント** ページで **New Client** ドロップダウンリストを開いて **Add Client** をクリックします。

    <Frame>
      <img src="https://mintcdn.com/abbyy/vsKEkGDuRLNqo_T3/images/vantage/tenant-admin/admin_managingrestapiclients_createclient4.png?fit=max&auto=format&n=vsKEkGDuRLNqo_T3&q=85&s=ecbe747d40ede12bf8e00425d21c47f6" alt="Add Client オプションを含む New Client ドロップダウン" style={{ width: "55%" }} width="704" height="141" data-path="images/vantage/tenant-admin/admin_managingrestapiclients_createclient4.png" />
    </Frame>
  </Step>

  <Step title="Client ID と Client Secret をコピーする">
    **Client Created** ダイアログで、各値の **copy** アイコンをクリックしてコピーします。または、**Save to File** をクリックして、両方の値が含まれる TXT ファイルをダウンロードします。

    <Frame>
      <img src="https://mintcdn.com/abbyy/vsKEkGDuRLNqo_T3/images/vantage/tenant-admin/admin_managingrestapiclients_createclient2.png?fit=max&auto=format&n=vsKEkGDuRLNqo_T3&q=85&s=9fefc52fdf897922ccef1ca0d53b04ee" alt="Client ID と Client Secret が表示された Client Created ダイアログ" style={{ width: "55%" }} width="898" height="439" data-path="images/vantage/tenant-admin/admin_managingrestapiclients_createclient2.png" />
    </Frame>

    <Warning>
      Client Secret は作成時に一度だけ表示されます。すぐに保存してください。後で完全な値を再度表示することはできません。
    </Warning>
  </Step>

  <Step title="ダイアログを閉じる">
    **Close** をクリックします。**公開 API クライアント** ページが開き、新しいクライアントを設定できます。
  </Step>
</Steps>

<div id="configuring-a-public-api-client">
  ## 公開 API クライアント の設定
</div>

公開 API クライアント を作成したら、その設定を行います。

クライアントの設定を開くには、**公開 API クライアント** ページでクライアント名をクリックするか、クライアント名またはアプリケーション プリンシパル ロールで検索します。

<Frame>
  <img src="https://mintcdn.com/abbyy/vsKEkGDuRLNqo_T3/images/vantage/tenant-admin/admin_managingrestapiclients_createclient3.png?fit=max&auto=format&n=vsKEkGDuRLNqo_T3&q=85&s=bf29027d53015de3f7735b7b82ab58af" alt="公開 API クライアント OAuth 2.0 設定ページ" style={{ width: "70%" }} width="1411" height="783" data-path="images/vantage/tenant-admin/admin_managingrestapiclients_createclient3.png" />
</Frame>

<Steps>
  <Step title="クライアントに名前を付ける">
    **Client Name** field に、このクライアントを識別する名前を入力します。
  </Step>

  <Step title="シークレットを管理する">
    **Add Secret** をクリックして、新しいクライアント シークレットを作成します。既定では、新しいシークレットの有効期限は 6 か月です。有効期限は 1 日から 36 か月まで設定できます。
  </Step>

  <Step title="リダイレクト URL を追加する">
    **Add Redirect URL** をクリックし、認可のリダイレクト先として許可する各 URL を入力します。
  </Step>

  <Step title="OAuth 2.0 フローを設定する">
    **OAuth 2.0 Flows Settings** セクションで、クライアントが使用できるフローを 1 つ以上選択します。

    * **Allow Authorization Code Flow** — アプリケーションが認証リクエストを Vantage の認可サーバーに直接送信する、安全な認証方式です。サーバーは資格情報を検証し、認可コードを返します。このフローは、すべての Vantage API クライアントで有効になっています。
      * **Require PKCE for Authorization Code Flow** — アクセス トークンを要求するアプリケーションが、認証を開始したアプリケーションと同一であることを Vantage が検証できるようにすることで、パブリック クライアントのセキュリティを強化します。
    * **Allow Resource Owner Password Credentials Flow** — ユーザー名とパスワードを使用したユーザー認証を可能にします。アプリケーションはユーザーのパスワードに直接アクセスできるため、ユーザーが完全に信頼しているアプリケーションでのみ使用してください。
    * **Allow issuing refresh tokens to refresh access tokens** — ユーザーに再度入力を求めることなくアクセス トークンを更新できるように、クライアントがリフレッシュ トークンを発行できるようにします。アプリケーションはリフレッシュ トークンを安全に保存する必要があります。
    * **Allow client credentials flow** — OAuth 2.0 Client Credentials flow を通じて、アプリケーションに Vantage API へのアクセスを許可します。ロールは、このオプションの下にある **Manage Roles** 設定によって決まります。

    <Note>
      External Identity Provider が設定されている場合、Resource Owner Password Credentials flow は使用できません。[Authentication](/ja/vantage/documentation/tenant-admin/tenant-management/authentication) を参照してください。
    </Note>
  </Step>

  <Step title="トークンの有効期間を設定する">
    **Token Lifetime Settings** セクションで、次を設定します。

    * **Access Token** — 発行されたアクセス トークンで Vantage へのアクセスが許可される期間。既定値: 24 時間。
    * **Refresh Token** — 最初のアクセス トークンの発行時点から始まる絶対期間。この期間中、リフレッシュ トークンを使用してアクセス トークンを更新できます。既定値: 30 日。
  </Step>
</Steps>

認証フローの詳細については、[Authentication](/ja/vantage/documentation/tenant-admin/tenant-management/authentication) を参照してください。

<div id="deleting-a-public-api-client">
  ## 公開 API クライアントの削除
</div>

クライアントを削除するには、**公開 API クライアント** ページでアイコンをクリックしてから **Delete Client** をクリックします。

<Frame>
  <img src="https://mintcdn.com/abbyy/vsKEkGDuRLNqo_T3/images/vantage/tenant-admin/admin_managingrestapiclients_createclient5.png?fit=max&auto=format&n=vsKEkGDuRLNqo_T3&q=85&s=965ae7500be7c00a4a1096a6ad1254dd" alt="クライアントのツールバーで Delete Client ボタンが強調表示された公開 API クライアント ページ" style={{ width: "74%" }} width="937" height="166" data-path="images/vantage/tenant-admin/admin_managingrestapiclients_createclient5.png" />
</Frame>

<div id="related-topics">
  ## 関連トピック
</div>

* [Vantage APIクライアントの管理](/ja/vantage/documentation/tenant-admin/tenant-management/manage-api-clients)
* [Authentication](/ja/vantage/documentation/tenant-admin/tenant-management/authentication)
