Skip to main content
POST
/
api
/
{serviceId}
/
idtoken
/
reissue
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.reissueIdToken({
    serviceId: "<id>",
  });

  console.log(result);
}

run();
{
  "resultCode": "<string>",
  "resultMessage": "<string>",
  "action": "OK",
  "responseContent": "<string>",
  "idToken": "<string>"
}

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.

Body

application/json
accessToken
string
required

The value of this parameter should be (a) the value of the "jwtAccessToken" parameter in a response from the /auth/token API when the value is available, or (b) the value of the "accessToken" parameter in the response from the /auth/token API when the value of the "jwtAccessToken" parameter is not available.

refreshToken
string
required

The value of this parameter should be the value of the "refreshToken" parameter in a response from the /auth/token API.

sub
string

The value that should be used as the value of the "sub" claim of the ID token. This parameter is optional. When omitted, the value of the subject associated with the access token is used.

claims
string

Additional claims that should be embedded in the payload part of the ID token. The format is a JSON object. This parameter is optional.

idtHeaderParams
string

Additional parameters that should be embedded in the JWS header of the ID token. The format is a JSON object. This parameter is optional.

idTokenAudType
string

The type of the "aud" claim of the ID token being issued. Valid values of this parameter are as follows.

ValueDescription
"array"The type of the aud claim becomes an array of strings.
"string"The type of the aud claim becomes a single string.

This parameter is optional, and the default value on omission is "array". This parameter takes precedence over the idTokenAudType property of {@link Service} (cf. {@link Service#getIdTokenAudType()}).

Response

ID token reissued successfully

resultCode
string

The code which represents the result of the API call.

resultMessage
string

A short message which explains the result of the API call.

action
enum<string>

The next action that the implementation of the token endpoint should take.

Available options:
OK,
INTERNAL_SERVER_ERROR,
CALLER_ERROR
responseContent
string

The response content that can be used as the message body of the token response that should be returned from the token endpoint.

idToken
string

The reissued ID token