Listing Non-Expired Tokens

Call the /tokens endpoint using GET to search for non-expired tokens for a specified user. You can search for either NORMAL or IMPERSONATED tokens for the user:

• NORMAL tokens—Specify the name or ID (email address) of the user for whom tokens were generated (as specified in the username field when POSTing to /uar/v1/token) in the username parameter.
• IMPERSONATED tokens—Specify the name or ID (email address) of the user who requested a token on behalf of another user (as returned in the tokenCreator field in the response to a token creation request) in the tokenCreator parameter.

Important:You need the Create Impersonated Token permission and a Manage Users permission (see Permissions for access-token-controller) to get a list of IMPERSONATED tokens.

You must specify a value for either the username or tokenCreator parameter. If you pass values for both parameters in the same request, the API returns a list of all non-expired tokens that match both parameters.

Important:If you do not have permission to view a given token, its details may be returned as masked entries.

Tip:If you want a more fine-grained search, use /tokens/search. Use the /tokens/count API to determine the number of tokens for a specified user.

Item

Description

URI

/uar/v1/tokens 

Method

GET 

Query parameters

• username (case sensitive)—Pass the name of the user for whom tokens were generated to get a list of all NORMAL tokens.

If you do not pass the username parameter, you must pass the tokenCreator parameter.

• tokenCreator (case sensitive)—Pass the name of the user who requested tokens on behalf of another user to get a list of all IMPERSONATED tokens.

If you do not pass the tokenCreator parameter, you must pass the username parameter.

• page (optional)—Retrieves a specific page. Must be a number (starting from 0).
• pagesize (optional)—Specifies how many tokens per page should be returned. Must be a number.

Request body

N/A

Response codes

200: Success

400: Unless you have the Create Impersonated Token permission and a Manage Users permission (see Permissions for access-token-controller), you cannot access tokens for other users.

Sample Request

The following shows an example for a Curl call to get unexpired IMPERSONATED tokens for user admin@mycompany.com, with pagination options 1 page and a maximum of 2 records per page:

curl -X GET --header 'Accept: application/json' 'https://<siteID>.flexnetoperations.com/flexnet/uar/v1/tokens?tokenCreator=admin%40mycompany.com&page=1&pagesize=2'

Sample Response

The following shows a sample response listing the IMPERSONATED access tokens for user admin@mycompany.com:

{

"statusMessage": "Successful",

"responseObject": [

{

"expiryStr": "0y 2M 25d 2h 50m",

"tokenName": "demo2",

"tokenDescription": "demo2-description",

"tokenType": "IMPERSONATED",

"username": "fnouser2@mycompany.com",

"tokenIssueMillis": 1721308129531,

"tokenExpiryMillis": 1731762710070,

"tokenCreator": "admin@mycompany.com"

},

{

"expiryStr": "10M",

"tokenName": "demo3",

"tokenDescription": "demo3-description",

"tokenType": "NORMAL",

"username": "fnouser3@mycompany.com",

"tokenIssueMillis": 1724329674453,

"tokenExpiryMillis": 1750596280485,

"tokenCreator": "admin@mycompany.com"

}

]

}