> ## 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.

> ## Agent Instructions
> ### Authlete versions
> Authlete 3.0 is the current version. Unless the user says they use another version, answer for Authlete 3.0 using the 3.x documentation.
> Documentation for Authlete 2.x (pages under `/v2/` and `/ja/v2/`) is for the legacy version. Refer to it only when the user is on Authlete 2.x.
>
> ### Authlete architecture
> Authlete is a backend engine for OAuth 2.0 and OpenID Connect processing. End users and client applications do not call it directly; the service provider's authorization server and API server call Authlete's APIs. Authlete handles protocol processing and token, client, and service management, while the service provider owns the OAuth/OIDC endpoints and user authentication.
> See [Architecture](https://developers.authlete.com/get-started/introduction-to-authlete/architecture.md).
>
> ### Concepts
> If the user is new to Authlete, read these pages first:
> - [Request and Response](https://developers.authlete.com/get-started/concepts/request-and-response.md): Core API requests pass the client's request parameters as-is, and responses return `resultCode`, `action`, and `responseContent`.
> - [Action Handling](https://developers.authlete.com/get-started/concepts/action-handling.md): Branch on `action`, never on `resultCode`, and map each action to the HTTP response your server returns.
> - [Two-Step API Calls](https://developers.authlete.com/get-started/concepts/two-step-api-calls.md): Actions such as `INTERACTION` are completed with a second call (`/auth/authorization/issue` or `/auth/authorization/fail`) linked by a `ticket`.
> - [Management API Overview](https://developers.authlete.com/get-started/concepts/overview.md): The Management API configures services, manages clients, and operates issued tokens, separately from the protocol flows handled by the Core API.
> - [API Authentication](https://developers.authlete.com/get-started/concepts/authentication.md): Authlete APIs use bearer tokens: a Service Access Token (one service) or an Organization Token (the whole organization).

# 発行済のアクセストークン一覧を取得する方法

> Authlete 2.0以降で利用可能な、既に発行済のアクセストークン一覧を取得する方法について解説。

## 概要

本ドキュメントでは、既に発行済のアクセストークン一覧を取得する方法について解説します。

> 本機能は Authlete 2.0 以降でのみ利用可能になります。

## /auth/token/get/list API

発行済のアクセストークン一覧を取得するためには /auth/token/get/list API を利用してください。

### 定義

```
GET /auth/token/get/list?
    clientIdentifier={clientIdentifier}
    &subject={subject}
    &start={start}
    &end={end}
```

### リクエスト

**パラメーター**

| パラメーター名 | 必須 | 説明 | デフォルト値 |
| - | - | - | - |
| clientIdentifier | NO | 特定のクライアントに紐づくアクセストークン一覧を取得したい場合はこのパラメーターに対象のクライアントの識別子を指定する。識別子として指定できる値は、**クライアント ID **あるいは**クライアント ID の別名**のいずれかである。 | なし |
| subject | NO | 特定のユーザーに紐づくアクセストークン一覧を取得したい場合はこのパラメーターに対象のユーザーの一意識別子を指定する。 | なし |
| start | NO | 検索結果の開始インデックス。 | 0 |
| end | NO | 検索結果の終了インデックス。 | 5 |

(注意) 本 API より返却されるアクセストークンの数 (= end - start の値) は、最大で 20 となっています (パフォーマンス劣化を防ぐため)。したがって、これを超えるようなパラメーター指定はエラーとなりますのでご注意ください。

### レスポンス

**パラメーター**

| パラメーター名 | 説明 |
| - | - |
| accessTokens | アクセストークンのリスト。 返却されるアクセストークンの情報については下記「アクセストークンの情報」を参照のこと。 |
| start | 検索結果の開始インデックス。 |
| end | 検索結果の終了インデックス。 |
| totalCount | 検索条件に該当するアクセストークンの総数。この値は accessTokens の要素数とは異なるので注意すること。 |

\*\*\
アクセストークンの情報

\*\*

| パラメーター名 | 説明 |
| - | - |
| accessTokenExpiresAt | アクセストークンの有効期限。 |
| accessTokenHash | アクセストークンのハッシュ値。 |
| clientId | アクセストークンに紐づけられているクライアントの ID。 |
| createdAt | アクセストークンの作成日時。 |
| grantType | アクセストークン生成時における認可種別。アクセストークンが更新されてもこの値は変更されないことに注意。 |
| lastRefreshedAt | アクセストークンが最後にリフレッシュトークンによって更新された日時。 |
| refreshTokenExpiresAt | リフレッシュトークンの有効期限。 |
| refreshTokenHash | リフレッシュトークンのハッシュ値。 |
| scopes | アクセストークンに紐づけられているスコープ群。 |
| subject | アクセストークンに紐づけられているユーザー一意識別子。 |

\*\*\
レスポンス例\
\*\*

```
{
    "accessTokens": [
        {
            "accessTokenExpiresAt": 1527583747000,
            "accessTokenHash": "kjjduowWXMPiHt1AjxbgkqWANOsVWQfKYCyFO76q1MU",
            "clientId": 11867130158,
            "createdAt": 1527497347000,
            "grantType": "AUTHORIZATION_CODE",
            "lastRefreshedAt": 0,
            "refreshTokenExpiresAt": 1528361347000,
            "refreshTokenHash": "hCkIkuS6py0drpe5XOybw0MxkgsYNOk2q3dtilLiI64",
            "scopes": ["openid"],
            "subject": "john"
        },
        {...},
        {...},
        {...},
        {...}
    ],
    "end": 5,
    "start": 0,
    "totalCount": 15
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.