v16

OpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-04-0886158866.0 KB
Token Endpoint

Issue Token Response

This API generates a content of a successful token response that the authorization server implementation returns to the client application.

post/api/{serviceId}/auth/token/issue

Path parameters

serviceIdstring required

A service ID.

Request body

ticketstring required

The ticket issued from Authlete /auth/token API.

subjectstring required

The subject (= unique identifier) of the authenticated user.

jwtAtClaimsstring

Additional claims that are added to the payload part of the JWT access token.

accessTokenstring

The representation of an access token that may be issued as a result of the Authlete API call.

accessTokenDurationinteger

The duration (in seconds) of the access token that may be issued as a result of the Authlete API call.

When this request parameter holds a positive integer, it is used as the duration of the access token in. In other cases, this request parameter is ignored.

refreshTokenDurationinteger

The duration (in seconds) of the refresh token that may be issued as a result of the Authlete API call.

When this request parameter holds a positive integer, it is used as the duration of the refresh token in. In other cases, this request parameter is ignored.

Response

Token issued successfully

resultCodestring

The code which represents the result of the API call.

resultMessagestring

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

action'INTERNAL_SERVER_ERROR' | 'OK'

The next action that the authorization server implementation should take.

responseContentstring

The content that the authorization server implementation is to return to the client application. Its format is JSON.

accessTokenstring

The newly issued access token. This parameter is a non-null value only when the value of action parameter is OK.

accessTokenExpiresAtinteger

The datetime at which the newly issued access token will expire. The value is represented in milliseconds since the Unix epoch (1970-01-01).

accessTokenDurationinteger

The duration of the newly issued access token in seconds.

refreshTokenstring

The refresh token. This parameter is a non-null value only when action is OK and the service supports the refresh token flow. If refreshTokenKept is set to false, a new refresh token is issued and the old refresh token used in the refresh token flow is invalidated. On the contrary, if refreshTokenKept is set to true, the refresh token itself is not refreshed.

refreshTokenExpiresAtinteger

The datetime at which the newly issued refresh token will expire. The value is represented in milliseconds since the Unix epoch (1970-01-01).

refreshTokenDurationinteger

The duration of the newly issued refresh token in seconds.

clientIdinteger

The client ID.

clientIdAliasstring

The client ID alias. If the client did not have an alias, this parameter is null.

clientIdAliasUsedboolean

The flag which indicates whether the client ID alias was used when the token request was made. true if the client ID alias was used when the token request was made.

subjectstring

The subject (= resource owner's ID) of the access token. Even if an access token has been issued by calling /api/auth/token API, this parameter is null if the flow of the token request was Client Credentials Flow (grant_type=client_credentials) because it means the access token is not associated with any specific end-user.

scopesstring[]

The scopes covered by the access token.

jwtAccessTokenstring

The newly issued access token in JWT format. If the authorization server is configured to issue JWT-based access tokens (= if the service's accessTokenSignAlg value is a non-null value), a JWT-based access token is issued along with the original random-string one.

accessTokenResourcesstring[]

The target resources of the access token being issued. See "Resource Indicators for OAuth 2.0" for details.

clientEntityIdstring

The entity ID of the client.

clientEntityIdUsedboolean

Flag which indicates whether the entity ID of the client was used when the request for the access token was made.

refreshTokenScopesstring[]

The scopes associated with the refresh token. May be null.

metadataDocumentLocationstring uri

The location of the client's metadata document that was used to resolve client metadata.

This property is set when client metadata was retrieved via the OAuth Client ID Metadata Document (CIMD) mechanism.

metadataDocumentUsedboolean

Flag indicating whether a metadata document was used to resolve client metadata for this request.

When true, the client metadata was retrieved via the CIMD mechanism rather than from the Authlete database.