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

# Management APIのアクセストークン

> Auth0 Management APIv2のアクセストークンの仕組みと使用方法について説明します。

[Auth0 Management API v2](/docs/ja-JP/ja-jp/api/management/v2)エンドポイントを呼び出すには、Auth0 <Tooltip data-tooltip-id="react-containers-DefinitionTooltip-0" href="/docs/ja-JP/ja-jp/glossary?term=management-api" tip="Management API: 顧客が管理タスクを実行できるようにするための製品。" cta="用語集の表示">Management API</Tooltip>トークンと呼ばれるアクセストークンを使って、認証を行う必要があります。これらのトークンは[JSON Web Token (JWT)](/docs/ja-JP/ja-jp/secure/tokens/json-web-tokens)で、[スコープ](/docs/ja-JP/ja-jp/get-started/apis/scopes/api-scopes)と呼ばれる固有の付与権限が含まれます。

<div id="audience">
  ## Management APIトークンを取得する
</div>

Management APIトークンをテスト用に初めて取得したときに、Dashboardでマシンツーマシンアプリケーションの認証を行います。Management APIの使用目的に応じて、様々な方法でManagement APIトークンを取得することができます。

* [テスト](/docs/ja-JP/ja-jp/secure/tokens/access-tokens/management-api-access-tokens/get-management-api-access-tokens-for-testing)：<Tooltip data-tooltip-id="react-containers-DefinitionTooltip-0" href="/docs/ja-JP/ja-jp/glossary?term=auth0-dashboard" tip="Auth0 Dashboard: サービスを構成するためのAuth0の主製品。" cta="用語集の表示">Auth0 Dashboard</Tooltip>でプロンプトに従って、テストトークンを[手動で](https://manage.auth0.com/#/apis/management/explorer)取得することができます。
* [本番環境](/docs/ja-JP/ja-jp/secure/tokens/access-tokens/management-api-access-tokens/get-management-api-access-tokens-for-production)：Auth0では、本番環境向けに短期トークンをプログラムで取得されることをお勧めします。
* [シングルページアプリケーション（SPA）](/docs/ja-JP/ja-jp/secure/tokens/access-tokens/management-api-access-tokens/get-management-api-tokens-for-single-page-applications)：SPAはパブリッククライアントで、機微情報を安全に保存できないため、他のアプリケーションタイプとは異なり、フロントエンドからManagement APIトークンを取得する必要があります。いくつかの制限事項が設けられています。

<div id="scopes">
  ## トークンのライフタイム
</div>

Management APIトークンの有効期限は24時間です。古いアクセストークンが期限切れになったら、トークンを新規作成します。

<div id="lifetime">
  ## トークンのセキュリティ
</div>

トークンをテスト目的で使用する場合は有効期間を変更できますが、セキュリティリスクを最小限に抑えるために、短期トークンを使用されることをお勧めします。Management APIトークンを更新または取り消すことはできません。

* **窃取されたトークン** ：トークンが窃取された場合は、Management API [`/delete_client_grants_by_id`](/docs/ja-JP/ja-jp/api/management/v2#!/Client_Grants/delete_client_grants_by_id)エンドポイントを使用するか、Dashboardで手動で[APIアプリケーションを無効化](https://manage.auth0.com/#/apis/management/authorized-applications)して、新しいトークンが発行されないようアプリケーション付与を削除することができます。
* **窃取されたクライアントシークレット** ：クライアントシークレットが窃取された場合は、Management API [`/post_rotate_secret`](/docs/ja-JP/ja-jp/api/management/v2#!/Clients/post_rotate_secret)エンドポイントを使用するか、Dashboardの**アプリケーションの設定** で[［Rotate（ローテーションする）］](https://manage.auth0.com/#/applications/\{yourClientId}/settings)アイコンをクリックして、クライアントシークレットをローテーションすることができます。

<div id="security">
  ## トークンのクォータ
</div>

Auth0 API（Management API、Authentication API、<Tooltip data-tooltip-id="react-containers-DefinitionTooltip-0" href="/docs/ja-JP/ja-jp/glossary?term=multifactor-authentication" tip="多要素認証（MFA）: ユーザー名とパスワードに加えて、SMS経由のコードなどの要素を使用するユーザー認証プロセス。" cta="用語集の表示">MFA</Tooltip> APIなど）に対して発行されたトークンは、DashboardにリストされたM2Mトークンクォータに加算**されません** 。クォータに加算されるのは、外部オーディエンスを持つトークンのみです。詳細については、「[Auth0 Management APIのレート制限](/docs/ja-JP/ja-jp/troubleshoot/customer-support/operational-policies/rate-limit-policy/management-api-endpoint-rate-limits)」を参照してください。

トークンクォータ制限は、サブスクリプションの階層別に分割されます。詳細については、「[Auth0の価格設定](https://auth0.com/pricing/)」を参照してください。現在のクオータには[Auth0サポートセンター](https://support.auth0.com/reports/quota)からアクセスできます。価格設定またはクォータに関する質問は、弊社の[セールスチーム](https://auth0.com/contact-us)まで直接お問い合わせください。

<div id="quota">
  ## もっと詳しく
</div>

* [テスト用にManagement APIアクセストークンを取得する](/docs/ja-JP/ja-jp/secure/tokens/access-tokens/management-api-access-tokens/get-management-api-access-tokens-for-testing)
* [本番環境のManagement APIアクセストークンの取得](/docs/ja-JP/ja-jp/secure/tokens/access-tokens/management-api-access-tokens/get-management-api-access-tokens-for-production)
* [シングルページアプリケーションのManagement APIアクセストークンを取得する](/docs/ja-JP/ja-jp/secure/tokens/access-tokens/management-api-access-tokens/get-management-api-tokens-for-single-page-applications)
* [Auth0 Management APIv2トークンの変更](/docs/ja-JP/ja-jp/secure/tokens/access-tokens/management-api-access-tokens/changes-in-auth0-management-apiv2-tokens)
* [アクセストークンを使用するManagement APIエンドポイントに移行する](/docs/ja-JP/ja-jp/troubleshoot/product-lifecycle/past-migrations/migrate-to-calling-api-with-access-tokens)
