revokeAccessToken

First introduced in version: 3.00.6.3

Syntax

revokeAccessToken(tokenId)

Details

Revokes the specified access token. Only the token owner or an administrator can perform this operation.

Arguments

tokenId is a STRING scalar specifying the identifier of the token to revoke. It can be obtained from the dictionary returned by createAccessToken or the table returned by listAccessTokens.

Returns

None.

Examples

// Get the current user name
accountName = getCurrentSessionAndUser()[1]

// Create an access token
accessCredential = createAccessToken(userId=accountName, expire=2030.12.31T23:59:59, description="MCP client")

// Get the identifier of the token created in this example
tokenIdToRevoke = accessCredential["tokenId"]

// Revoke the token
revokeAccessToken(tokenId=tokenIdToRevoke)

Related functions: createAccessToken, listAccessTokens, authenticateByTicket