All Products
Search
Document Center

Identity as a Service:GenerateJwtAuthenticationToken

Last Updated:Oct 26, 2026

Generates a JWT authentication token.

Operation description

This API performs authentication and authorization based on an access token issued by IDaaS.

Make sure that the access token you pass has the functional authorization to access the built-in PAM (Privileged Access Management) application of IDaaS and obtain authentication tokens.

Note

The corresponding scope is urn:cloud:idaas:pam|authentication_token:obtain.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /v2/{instanceId}/authenticationTokens/_/actions/generateJwt HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

instanceId

string

Yes

The instance ID.

idaas_ue2jvisn35ea5lmthk267xxxxx

Request parameters

Parameter

Type

Required

Description

Example

Authorization

string

Yes

The authentication information. The format is Bearer ${access_token}.

Note

Enter the access token issued by IDaaS.

Bearer xxxxxx

body

object

No

The request body.

credentialProviderIdentifier

string

Yes

The credential provider identifier.

test_example_identifier

issuer

string

No

The iss field of the JWT.

https://test.issuer.com

subject

string

Yes

The sub field of the JWT.

test_jwt_subject

audiences

array

Yes

The aud field of the JWT.

string

No

The JWT audience.

test_jwt_audience

customClaims

object

No

The custom claims.

Important The claims are in key-value pairs, where the keys must be of the string type.

any

No

The custom claim key-value pair.

-

expiration

integer

No

The validity period of the JWT, in seconds.

900

includeDerivedShortToken

boolean

No

Specifies whether to include a derived short token when generating the JWT.

true

Response elements

Element

Type

Description

Example

object

The JWT authentication token details.

instanceId

string

The instance ID.

idaas_ue2jvisn35ea5lmthk267xxxxx

authenticationTokenId

string

The authentication token ID.

atntkn_01kqflm0sxxx8nmdc1cb5dskxxxxx

credentialProviderId

string

The credential provider ID.

atp_01kr2cmj5gxxx4fvmls2e93dxxxxx

createTime

integer

The creation time of the authentication token. The value is a UNIX timestamp in milliseconds.

1649830225000

updateTime

integer

The update time of the authentication token. The value is a UNIX timestamp in milliseconds.

1649830225000

authenticationTokenType

string

The type of the authentication token.

Note

The value is fixed as jwt, which indicates a JWT authentication token.

jwt

revoked

boolean

Indicates whether the authentication token is revoked.

false

creatorType

string

The type of the creator of the authentication token. Valid values:

  • application: application

application

creatorId

string

The ID of the creator of the authentication token.

app_ngtkgrrxxxxktg5eao6z4xxxxx

consumerType

string

The type of the consumer of the authentication token. Valid values:

  • application: application

  • custom: custom type

custom

consumerId

string

The ID of the consumer of the authentication token.

test_jwt_subject

expirationTime

integer

The expiration time of the authentication token. The value is a UNIX timestamp in milliseconds.

1772693568000

jwtContent

object

The content of the JWT authentication token.

jwtValue

string

The JWT value.

eyJhbGciOixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

derivedShortToken

string

The derived short token of the JWT.

sk-Nx2vzxxxxxxxxxxxxxxxxx

Examples

Success response

JSON format

{
  "instanceId": "idaas_ue2jvisn35ea5lmthk267xxxxx",
  "authenticationTokenId": "atntkn_01kqflm0sxxx8nmdc1cb5dskxxxxx",
  "credentialProviderId": "atp_01kr2cmj5gxxx4fvmls2e93dxxxxx",
  "createTime": 1649830225000,
  "updateTime": 1649830225000,
  "authenticationTokenType": "jwt",
  "revoked": false,
  "creatorType": "application",
  "creatorId": "app_ngtkgrrxxxxktg5eao6z4xxxxx",
  "consumerType": "custom",
  "consumerId": "test_jwt_subject",
  "expirationTime": 1772693568000,
  "jwtContent": {
    "jwtValue": "eyJhbGciOixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "derivedShortToken": "sk-Nx2vzxxxxxxxxxxxxxxxxx"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.