import { Authlete } from "@authlete/typescript-sdk";
const authlete = new Authlete({
bearer: process.env["AUTHLETE_BEARER"] ?? "",
});
async function run() {
const result = await authlete.dynamicClientRegistration.get({
serviceId: "<id>",
requestBody: {
token: "qs4Tu5TV7qqDYT93bFs6ISyhTByMF9o-54GY4JU5vTA",
clientId: "26837717140341",
},
});
console.log(result);
}
run();require 'authlete_ruby_sdk'
Models = ::Authlete::Models
s = ::Authlete::Client.new(
bearer: '<YOUR_BEARER_TOKEN_HERE>'
)
res = s.dynamic_client_registration.retrieve(service_id: '<id>', request_body: Models::Operations::ClientRegistrationGetApiRequestBody.new(
token: 'qs4Tu5TV7qqDYT93bFs6ISyhTByMF9o-54GY4JU5vTA',
client_id: '26837717140341'
))
unless res.client_registration_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.DynamicClientRegistration.Get(ctx, "<id>", operations.ClientRegistrationGetAPIRequestBody{
Token: "qs4Tu5TV7qqDYT93bFs6ISyhTByMF9o-54GY4JU5vTA",
ClientID: "26837717140341",
})
if err != nil {
log.Fatal(err)
}
if res.ClientRegistrationResponse != nil {
// handle response
}
}curl --request POST \
--url https://us.authlete.com/api/{serviceId}/client/registration/get \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clientId": "26837717140341",
"token": "qs4Tu5TV7qqDYT93bFs6ISyhTByMF9o-54GY4JU5vTA"
}
'{
"resultCode": "A217001",
"resultMessage": "[A217001] The client information has been returned.",
"action": "OK",
"client": {
"authTimeRequired": false,
"bcUserCodeRequired": false,
"clientId": 26837717140341,
"clientIdAliasEnabled": false,
"clientName": "My Dynamic Client",
"clientSecret": "bMsjvZm2FE1_mqJgxhmYj_Wr8rA0Pia_A_j-V076qQm6-P1edKB055W579GBe7MSbOdxZ3dJKsKinCtdIFwxpw",
"clientType": "CONFIDENTIAL",
"createdAt": 1641735467000,
"defaultMaxAge": 0,
"developer": "authlete_21653835348762",
"dynamicallyRegistered": true,
"frontChannelRequestObjectEncryptionRequired": false,
"idTokenSignAlg": "RS256",
"modifiedAt": 1641735467000,
"number": 6248,
"parRequired": false,
"requestObjectEncryptionAlgMatchRequired": false,
"requestObjectEncryptionEncMatchRequired": false,
"requestObjectRequired": false,
"serviceNumber": 5041,
"subjectType": "PUBLIC",
"tlsClientCertificateBoundAccessTokens": false,
"tokenAuthMethod": "CLIENT_SECRET_BASIC"
},
"responseContent": "{\\\"default_max_age\\\":0,\\\"registration_client_uri\\\":\\\"https://my-service.example.com/dcr/register/26837717140341\\\",\\\"registration_access_token\\\":\\\"qs4Tu5TV7qqDYT93bFs6ISyhTByMF9o-54GY4JU5vTA\\\",\\\"client_id\\\":\\\"26837717140341\\\",\\\"token_endpoint_auth_method\\\":\\\"client_secret_basic\\\",\\\"require_pushed_authorization_requests\\\":false,\\\"backchannel_user_code_parameter\\\":false,\\\"client_secret\\\":\\\"bMsjvZm2FE1_mqJgxhmYj_Wr8rA0Pia_A_j-V076qQm6-P1edKB055W579GBe7MSbOdxZ3dJKsKinCtdIFwxpw\\\",\\\"client_id_issued_at\\\":1641735467,\\\"tls_client_certificate_bound_access_tokens\\\":false,\\\"client_name\\\":\\\"My Dynamic Client\\\",\\\"id_token_signed_response_alg\\\":\\\"RS256\\\",\\\"subject_type\\\":\\\"public\\\",\\\"client_secret_expires_at\\\":0,\\\"require_signed_request_object\\\":false}"
}{
"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."
}Get Client
Get a dynamically registered client. This API is supposed to be used to implement a client registration management endpoint that complies with RFC 7592 (OAuth 2.0 Dynamic Registration Management).
import { Authlete } from "@authlete/typescript-sdk";
const authlete = new Authlete({
bearer: process.env["AUTHLETE_BEARER"] ?? "",
});
async function run() {
const result = await authlete.dynamicClientRegistration.get({
serviceId: "<id>",
requestBody: {
token: "qs4Tu5TV7qqDYT93bFs6ISyhTByMF9o-54GY4JU5vTA",
clientId: "26837717140341",
},
});
console.log(result);
}
run();require 'authlete_ruby_sdk'
Models = ::Authlete::Models
s = ::Authlete::Client.new(
bearer: '<YOUR_BEARER_TOKEN_HERE>'
)
res = s.dynamic_client_registration.retrieve(service_id: '<id>', request_body: Models::Operations::ClientRegistrationGetApiRequestBody.new(
token: 'qs4Tu5TV7qqDYT93bFs6ISyhTByMF9o-54GY4JU5vTA',
client_id: '26837717140341'
))
unless res.client_registration_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.DynamicClientRegistration.Get(ctx, "<id>", operations.ClientRegistrationGetAPIRequestBody{
Token: "qs4Tu5TV7qqDYT93bFs6ISyhTByMF9o-54GY4JU5vTA",
ClientID: "26837717140341",
})
if err != nil {
log.Fatal(err)
}
if res.ClientRegistrationResponse != nil {
// handle response
}
}curl --request POST \
--url https://us.authlete.com/api/{serviceId}/client/registration/get \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clientId": "26837717140341",
"token": "qs4Tu5TV7qqDYT93bFs6ISyhTByMF9o-54GY4JU5vTA"
}
'{
"resultCode": "A217001",
"resultMessage": "[A217001] The client information has been returned.",
"action": "OK",
"client": {
"authTimeRequired": false,
"bcUserCodeRequired": false,
"clientId": 26837717140341,
"clientIdAliasEnabled": false,
"clientName": "My Dynamic Client",
"clientSecret": "bMsjvZm2FE1_mqJgxhmYj_Wr8rA0Pia_A_j-V076qQm6-P1edKB055W579GBe7MSbOdxZ3dJKsKinCtdIFwxpw",
"clientType": "CONFIDENTIAL",
"createdAt": 1641735467000,
"defaultMaxAge": 0,
"developer": "authlete_21653835348762",
"dynamicallyRegistered": true,
"frontChannelRequestObjectEncryptionRequired": false,
"idTokenSignAlg": "RS256",
"modifiedAt": 1641735467000,
"number": 6248,
"parRequired": false,
"requestObjectEncryptionAlgMatchRequired": false,
"requestObjectEncryptionEncMatchRequired": false,
"requestObjectRequired": false,
"serviceNumber": 5041,
"subjectType": "PUBLIC",
"tlsClientCertificateBoundAccessTokens": false,
"tokenAuthMethod": "CLIENT_SECRET_BASIC"
},
"responseContent": "{\\\"default_max_age\\\":0,\\\"registration_client_uri\\\":\\\"https://my-service.example.com/dcr/register/26837717140341\\\",\\\"registration_access_token\\\":\\\"qs4Tu5TV7qqDYT93bFs6ISyhTByMF9o-54GY4JU5vTA\\\",\\\"client_id\\\":\\\"26837717140341\\\",\\\"token_endpoint_auth_method\\\":\\\"client_secret_basic\\\",\\\"require_pushed_authorization_requests\\\":false,\\\"backchannel_user_code_parameter\\\":false,\\\"client_secret\\\":\\\"bMsjvZm2FE1_mqJgxhmYj_Wr8rA0Pia_A_j-V076qQm6-P1edKB055W579GBe7MSbOdxZ3dJKsKinCtdIFwxpw\\\",\\\"client_id_issued_at\\\":1641735467,\\\"tls_client_certificate_bound_access_tokens\\\":false,\\\"client_name\\\":\\\"My Dynamic Client\\\",\\\"id_token_signed_response_alg\\\":\\\"RS256\\\",\\\"subject_type\\\":\\\"public\\\",\\\"client_secret_expires_at\\\":0,\\\"require_signed_request_object\\\":false}"
}{
"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.
Body
The client registration access token. Used only for GET, UPDATE, and DELETE requests.
The client's identifier. Used for GET, UPDATE, and DELETE requests
Response
The code which represents the result of the API call.
A short message which explains the result of the API call.
The next action that the authorization server implementation should take.
BAD_REQUEST, CREATED, DELETED, INTERNAL_SERVER_ERROR, OK, UNAUTHORIZED, UPDATED The content that the authorization server implementation is to return to the client application.
Its format varies depending on the value of action parameter.
Show child attributes
Show child attributes
{
"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"]
}