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

# トークン有効期間の制御 (クライアント単位)

> トークンの有効期間をクライアント単位で制御する方法について説明します。

<Info>
  For **Authlete 2.x** documentation, see [2.x version](/ja/v2/configuration-reference/tokens-and-claims/token-duration-per-client).
</Info>

## Overview

In Authlete 3.0, token durations can be configured at multiple levels, including the **Service level** and the **Client level**. These durations can be set **statically** at these levels or configured **dynamically** based on specific scopes. For more details on dynamic configuration, refer to the [Token Duration Per Scope documentation](/configuration-reference/tokens-and-claims/token-duration-per-scope).

This short article explains how to set token durations for **access tokens**, **refresh tokens** and **ID tokens** at the **client level**.

***

## Configuring Token Duration for a Client

To configure the token duration for **access tokens** or **refresh tokens**, follow these steps:

### Access Token Duration

1. Log in to the [Authlete Management Console](https://console.authlete.com).
2. Navigate to **Client Settings > Tokens and Claims > Access Token**.
3. In the **General** section, locate the **Enter Duration** field.
4. Set the desired duration for access tokens in seconds (as shown in the screenshot below).
5. Click **Save Changes** to apply the configuration.

![](https://storage.googleapis.com/authlete-website/resources/kb/token-duration-per-client/1.png)

***

### Refresh Token Duration

1. Log in to the [Authlete Management Console](https://console.authlete.com).
2. Navigate to **Client Settings > Tokens and Claims > Refresh Token**.
3. In the **General** section, locate the **Enter Duration** field.
4. Set the desired duration for refresh tokens in seconds (as shown in the screenshot below).
5. Click **Save Changes** to apply the configuration.

![](https://storage.googleapis.com/authlete-website/resources/kb/token-duration-per-client/2.png)

***

### ID Token Duration

1. Log in to the [Authlete Management Console](https://console.authlete.com).
2. Navigate to **Client Settings > Tokens and Claims > ID Token**.
3. In the **ID Token Duration** section, locate the **Enter Duration** field.
4. Set the desired duration for ID tokens in seconds (as shown in the screenshot below).
5. Click **Save Changes** to apply the configuration.

![](https://storage.googleapis.com/authlete-website/resources/kb/token-duration-per-client/3.png)

***

## Example

Assume there is a service and two clients registered with it. The values of the access token duration are configured as follows:

| Entity   | Access Token Duration (seconds) |
| -------- | ------------------------------- |
| Service  | 86,400                          |
| Client 1 | (not set)                       |
| Client 2 | 3,000                           |

Under these conditions, Authlete’s [/auth/authorization/issue](/api-reference/authorization-endpoint/issue-authorization-response) API responds to implicit grant flow authorization requests from the clients as follows:

### Response to an authorization request from Client 1

```json theme={null}
{
    "type": "authorizationIssueResponse",
    "accessTokenDuration": 86400,
    "responseContent": "https://client.example.org/cb/example.com#access_token=1zT0XRynwLryWYRKCYSDjrwku5sD-WQTCtC1tnfExZE&token_type=Bearer&expires_in=86400&scope=openid"
}
```

**Explanation**: The access token duration for the Service is used since no value is configured for Client 1.

### Response to an authorization request from Client 2

```json theme={null}
{
   "type": "authorizationIssueResponse",
   "accessTokenDuration": 3000,
   "responseContent": "https://client.example.org/cb/example.com#access_token=xg79MJucCq8f8QPA2_o9_q5nfzgbRQycgVwYSvMSWTY&token_type=Bearer&expires_in=3000&scope=openid"
}
```

**Explanation**: The access token duration for Client 2 is used since it is explicitly set.

## See Also

* [How Authlete determines token duration](/configuration-reference/tokens-and-claims/how-authlete-determines-token-duration)
* [Token Duration Per Scope](/configuration-reference/tokens-and-claims/token-duration-per-scope)
