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();require 'authlete_ruby_sdk'
Models = ::Authlete::Models
s = ::Authlete::Client.new(
bearer: '<YOUR_BEARER_TOKEN_HERE>'
)
req = Models::Operations::AuthTokenGetListApiRequest.new(
service_id: '<id>'
)
res = s.token_management.list(request: req)
unless res.token_get_list_response.nil?
# handle response
endpackage main
import(
"context"
"os"
authlete "github.com/authlete/authlete-go-sdk"
"github.com/authlete/authlete-go-sdk/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := authlete.New(
authlete.WithSecurity(os.Getenv("AUTHLETE_BEARER")),
)
res, err := s.Token.Management.List(ctx, operations.AuthTokenGetListAPIRequest{
ServiceID: "<id>",
})
if err != nil {
log.Fatal(err)
}
if res.TokenGetListResponse != nil {
// handle response
}
}curl --request GET \
--url https://us.authlete.com/api/{serviceId}/auth/token/get/list \
--header 'Authorization: Bearer <token>'{
"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
}{
"resultCode": "A001201",
"resultMessage": "[A001201] /auth/authorization, TLS must be used."
}{
"resultCode": "A001202",
"resultMessage": "[A001202] /auth/authorization, Authorization header is missing."
}{
"resultCode": "A001215",
"resultMessage": "[A001215] /auth/authorization, The client (ID = 26837717140341) is locked."
}{
"resultCode": "A001311",
"resultMessage": "[A001311] /auth/authorization, Too many requests, retry after 1 seconds. (Entity: 23769878923/87122303)"
}{
"resultCode": "A001101",
"resultMessage": "[A001101] /auth/authorization, Authlete Server error."
}List Issued Tokens
Get the list of access tokens that are associated with the service.
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();require 'authlete_ruby_sdk'
Models = ::Authlete::Models
s = ::Authlete::Client.new(
bearer: '<YOUR_BEARER_TOKEN_HERE>'
)
req = Models::Operations::AuthTokenGetListApiRequest.new(
service_id: '<id>'
)
res = s.token_management.list(request: req)
unless res.token_get_list_response.nil?
# handle response
endpackage main
import(
"context"
"os"
authlete "github.com/authlete/authlete-go-sdk"
"github.com/authlete/authlete-go-sdk/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := authlete.New(
authlete.WithSecurity(os.Getenv("AUTHLETE_BEARER")),
)
res, err := s.Token.Management.List(ctx, operations.AuthTokenGetListAPIRequest{
ServiceID: "<id>",
})
if err != nil {
log.Fatal(err)
}
if res.TokenGetListResponse != nil {
// handle response
}
}curl --request GET \
--url https://us.authlete.com/api/{serviceId}/auth/token/get/list \
--header 'Authorization: Bearer <token>'{
"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
}{
"resultCode": "A001201",
"resultMessage": "[A001201] /auth/authorization, TLS must be used."
}{
"resultCode": "A001202",
"resultMessage": "[A001202] /auth/authorization, Authorization header is missing."
}{
"resultCode": "A001215",
"resultMessage": "[A001215] /auth/authorization, The client (ID = 26837717140341) is locked."
}{
"resultCode": "A001311",
"resultMessage": "[A001311] /auth/authorization, Too many requests, retry after 1 seconds. (Entity: 23769878923/87122303)"
}{
"resultCode": "A001101",
"resultMessage": "[A001101] /auth/authorization, Authlete Server error."
}Authorizations
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
A service ID.
Query Parameters
Client Identifier (client ID or client ID alias).
Unique user ID.
Start index of search results (inclusive). The default value is 0.
End index of search results (exclusive). The default value is 5.
Response
Start index of search results (inclusive).
End index of search results (exclusive).
Unique ID of a client developer.
Show child attributes
Show child attributes
Unique user ID of an end-user.
An array of access tokens.
Show child attributes
Show child attributes