Skip to main content
GET
/
api
/
{serviceId}
/
auth
/
token
/
get
/
list
Typescript (SDK)
import { Authlete } from "@authlete/typescript-sdk";

const authlete = new Authlete({
  bearer: process.env["AUTHLETE_BEARER"] ?? "",
});

async function run() {
  const result = await authlete.token.management.list({
    serviceId: "<id>",
  });

  console.log(result);
}

run();
{
  "accessTokens": [
    {
      "accessTokenExpiresAt": 1642048149000,
      "accessTokenHash": "tC5hpjGylLiiw-vsd5_tqVHtYSUHblAGimEJ-5xqAco",
      "clientId": 26888344961664,
      "createdAt": 1642044549000,
      "grantType": "AUTHORIZATION_CODE",
      "lastRefreshedAt": 0,
      "refreshTokenExpiresAt": 1642048149000,
      "refreshTokenHash": "jv4B_7_kpY-Rez_E7bYIxGYnZk43w18uigkaeUe6tc4",
      "scopes": [
        "history.read"
      ],
      "subject": "john"
    },
    {
      "accessTokenExpiresAt": 1642051604000,
      "accessTokenHash": "Bk1QneTxkoLKw_RRB8ToVL25Plt075RvPK68N9cWWtg",
      "clientId": 26888344961664,
      "createdAt": 1642048004000,
      "grantType": "AUTHORIZATION_CODE",
      "lastRefreshedAt": 0,
      "refreshTokenExpiresAt": 1642051604000,
      "refreshTokenHash": "YHmwk4xETvoIJ_maWCpJDlpvmcFLkxmaaSS-v9KPng4",
      "scopes": [
        "history.read",
        "openid",
        "timeline.read"
      ],
      "subject": "john"
    },
    {
      "accessTokenExpiresAt": 1642052094000,
      "accessTokenHash": "UUatYXjkqYFbRQlnItjq03DtUYA2MRRtuL88GCbQpbw",
      "clientId": 26888344961664,
      "createdAt": 1642048494000,
      "grantType": "AUTHORIZATION_CODE",
      "lastRefreshedAt": 0,
      "refreshTokenExpiresAt": 1642052094000,
      "refreshTokenHash": "wjc-IXoScxDiVyBmRrB92I-B0zMXSSKw_qwP_WK1lFM",
      "scopes": [
        "history.read"
      ],
      "subject": "john"
    }
  ],
  "client": {
    "clientId": 26888344961664,
    "clientIdAliasEnabled": false,
    "clientName": "My Device Flow Client",
    "clientType": "CONFIDENTIAL",
    "number": 6260
  },
  "end": 3,
  "start": 0,
  "subject": "john",
  "totalCount": 3
}

Authorizations

Authorization
string
header
required

Authenticate every request with a Service Access Token or Organization Token. Set the token value in the Authorization: Bearer <token> header.

Service Access Token: Scoped to a single service. Use when automating service-level configuration or runtime flows.

Organization Token: Scoped to the organization; inherits permissions across services. Use for org-wide automation or when managing multiple services programmatically.

Both token types are issued by the Authlete console or provisioning APIs.

Path Parameters

serviceId
string
required

A service ID.

Query Parameters

clientIdentifier
string

Client Identifier (client ID or client ID alias).

subject
string

Unique user ID.

start
integer<int32>

Start index of search results (inclusive). The default value is 0.

end
integer<int32>

End index of search results (exclusive). The default value is 5.

Response

start
integer<int32>

Start index of search results (inclusive).

end
integer<int32>

End index of search results (exclusive).

totalCount
integer<int32>

Unique ID of a client developer.

client
object
subject
string

Unique user ID of an end-user.

accessTokens
object[]

An array of access tokens.