import { Authlete } from "@authlete/typescript-sdk";
const authlete = new Authlete({
serviceId: "255950",
bearer: process.env["AUTHLETE_BEARER"] ?? "",
});
async function run() {
const result = await authlete.client.listByCursor({});
for await (const page of result) {
console.log(page);
}
}
run();require 'authlete_ruby_sdk'
Models = ::Authlete::Models
s = ::Authlete::Client.new(
service_id: '<id>',
bearer: '<YOUR_BEARER_TOKEN_HERE>'
)
res = s.clients.list_by_cursor
unless res.one_of.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.WithServiceID("255950"),
authlete.WithSecurity(os.Getenv("AUTHLETE_BEARER")),
)
res, err := s.Client.ListByCursor(ctx, operations.ClientCursorListAPIRequest{})
if err != nil {
log.Fatal(err)
}
if res.OneOf != nil {
for {
// handle items
res, err = res.Next()
if err != nil {
// handle error
}
if res == nil {
break
}
}
}
}curl --request GET \
--url https://us.authlete.com/api/{serviceId}/client \
--header 'Authorization: Bearer <token>'{
"limit": 123,
"nextCursor": "<string>",
"totalCount": 123,
"entities": [
{
"number": 1140735077,
"serviceNumber": 715948317,
"clientName": "My Test Client",
"clientId": "1140735077",
"clientSecret": "gXz97ISgLs4HuXwOZWch8GEmgL4YMvUJwu3er_kDVVGcA0UOhA9avLPbEmoeZdagi9yC_-tEiT2BdRyH9dbrQQ",
"clientType": "PUBLIC",
"redirectUris": [
"https://example.com/callback"
],
"responseTypes": [
"CODE"
],
"grantTypes": [
"AUTHORIZATION_CODE"
]
}
]
}{
"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": "A001101",
"resultMessage": "[A001101] /auth/authorization, Authlete Server error."
}List Clients (Cursor Pagination)
Retrieve the clients in the requested service via cursor based iteration.
import { Authlete } from "@authlete/typescript-sdk";
const authlete = new Authlete({
serviceId: "255950",
bearer: process.env["AUTHLETE_BEARER"] ?? "",
});
async function run() {
const result = await authlete.client.listByCursor({});
for await (const page of result) {
console.log(page);
}
}
run();require 'authlete_ruby_sdk'
Models = ::Authlete::Models
s = ::Authlete::Client.new(
service_id: '<id>',
bearer: '<YOUR_BEARER_TOKEN_HERE>'
)
res = s.clients.list_by_cursor
unless res.one_of.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.WithServiceID("255950"),
authlete.WithSecurity(os.Getenv("AUTHLETE_BEARER")),
)
res, err := s.Client.ListByCursor(ctx, operations.ClientCursorListAPIRequest{})
if err != nil {
log.Fatal(err)
}
if res.OneOf != nil {
for {
// handle items
res, err = res.Next()
if err != nil {
// handle error
}
if res == nil {
break
}
}
}
}curl --request GET \
--url https://us.authlete.com/api/{serviceId}/client \
--header 'Authorization: Bearer <token>'{
"limit": 123,
"nextCursor": "<string>",
"totalCount": 123,
"entities": [
{
"number": 1140735077,
"serviceNumber": 715948317,
"clientName": "My Test Client",
"clientId": "1140735077",
"clientSecret": "gXz97ISgLs4HuXwOZWch8GEmgL4YMvUJwu3er_kDVVGcA0UOhA9avLPbEmoeZdagi9yC_-tEiT2BdRyH9dbrQQ",
"clientType": "PUBLIC",
"redirectUris": [
"https://example.com/callback"
],
"responseTypes": [
"CODE"
],
"grantTypes": [
"AUTHORIZATION_CODE"
]
}
]
}{
"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": "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
The ID of the service to retrieve a list of clients from.
^\d+$Query Parameters
This should be set to the value of nextCursor from a previous call to this endpoint. Which will retrieve the next set of clients available and receive the next available set. If this is not provided the list operation will start from the beginning.
The maximum amount of results to return from this request. This value will be clamped between 1 and the allowed maximum. The default will be used if no value is provided.
Indicates whether the totalCount property should be calculated and included in the response, otherwise it will be unset. For some large datasets this can be expensive and is not always required to calculate.
Response
The clamped requested limit of clients to return from the request.
If there are more entries to retrieve this value will be generated and returned. The next call to this endpoint should use this value as the cursor to continue to continue to retrieve the remaining clients from the correct point. If there are no further clients to list this property will not be set.
The total number of clients that belong to the service. This doesn't mean the number of clients contained in the response.
The list of clients.
Show child attributes
Show child attributes