Returns a paged list of OTP hardware tokens.

To fetch all results, call repeatedly with the offset parameter as long as the result metadata has a next_offset value.

If no type and serial parameters are provided, the list will contain all hardware tokens.

Otherwise, the list will contain either a single hardware token (if a match was found) or no hardware tokens.

Requires “Grant read resource” API permission.

Parameters

ParameterDescription
LimitThe maximum number of records returned.Default: 100; Max: 500
OffsetThe offset from 0 at which to start record retrieval.When used with “limit”, the handler will return “limit” records starting at the n-th record, where n is the offset.Default: 0
Serial NumberThe serial number of the hardware token.This option is required if type is present.
TypeSpecify a type and serial number to look up a single hardware token. One of: - “h6” HOTP-6 hardware token - “h8” HOTP-8 hardware token - “yk” YubiKey AES hardware token - “d1” Duo-D100 hardware tokenThis option is required if serial is present.

Example Output

{
	"stat": "OK",
	"response": [
		{
			"admins": [
				{
					"admin_id": "DESMP00LIAKRJPD4DZSH",
					"created": 1648143942,
					"email": "jsmith@example.com",
					"last_login": 1343921403,
					"name": "Joe Smith"
				}
			],
			"serial": "123456",
			"token_id": "DHIZ34ALBA2445ND4AI2",
			"totp_step": null,
			"type": "d1",
			"users": [
				{
					"alias1": "joe.smith",
					"alias2": "jsmith@example.com",
					"alias3": null,
					"alias4": null,
					"aliases": {
						"alias1": "joe.smith",
						"alias2": "jsmith@example.com"
					},
					"created": 1343621411,
					"email": "jsmith@example.com",
					"is_enrolled": true,
					"last_directory_sync": null,
					"last_login": 1343921403,
					"notes": "",
					"realname": "Joe Smith",
					"status": "active",
					"user_id": "DUJZ2U4L80HT45MQ4EOQ",
					"username": "jsmith"
				}
			]
		}
	]
}

Workflow Library Example

List Hardware Tokens with Duo and Send Results Via Email

Preview this Workflow on desktop