> ## Documentation Index
> Fetch the complete documentation index at: https://docs-dev-docs-event-stream-action-templates.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# トークンの取得

> これはサーバープロセスがAPIへのアクセス時に使用するOAuth 2.0権限付与です。アプリケーションの資格情報（クライアントIDとクライアントシークレット）を使用して、アクセストークンを直接要求するためにこのエンドポイントを使用します。

`POST /oauth/token`

これはサーバープロセスがAPIへのアクセス時に使用するOAuth 2.0権限付与です。アプリケーションの資格情報（クライアントIDとクライアントシークレット）を使用して、アクセストークンを直接要求するためにこのエンドポイントを使用します。

### 応答

#### 200

成功応答ではアクセストークンが返されます。

```
{
  "access_token":"eyJz93a...k4laUWw",
  "token_type":"Bearer",
  "expires_in":86400
}
```

### 詳しく学ぶ

* [クライアントの資格情報フロー](https://auth0.com/docs/ja-jp/get-started/authentication-and-authorization-flow/client-credentials-flow)
* [クライアントの資格情報フローを使用してAPIを呼び出す](https://auth0.com/docs/ja-jp/get-started/authentication-and-authorization-flow/client-credentials-flow/call-your-api-using-the-client-credentials-flow)
* [Management Dashboardを使用してクライアント付与を設定する](https://auth0.com/docs/ja-jp/get-started/applications/update-grant-types)
* [クライアント資格情報付与をアクセストークンに要求する](https://auth0.com/docs/ja-jp/get-started/authentication-and-authorization-flow/client-credentials-flow/call-your-api-using-the-client-credentials-flow)

## Parameters

<ParamField body="grant_type" type="string">
  使用するフローを示します。クライアント資格情報については、`client_credentials`を使用。
</ParamField>

<ParamField body="client_id" type="string">
  アプリケーションのクライアントIDです。
</ParamField>

<ParamField body="client_secret" type="string">
  アプリケーションのクライアントシークレットです。
</ParamField>

<ParamField body="audience" type="string">
  アクセスしたいターゲットAPIの一意の識別子です。
</ParamField>

<ParamField body="organization" type="string">
  \[推奨]要求を関連付けたい組織または識別子です。詳細については、「[Organizationsのマシンツーマシンアクセス](https://auth0.com/docs/ja-jp/manage-users/organizations/organizations-for-m2m-applications)をお読みください。
</ParamField>

## Response

| Status | Description |
| ------ | ----------- |
| 200    | 成功レスポンス     |
