Fortinet black logo

GET

GET

URI:
  • /api/v1/token
Input fields:
Field name Type Required

Description

available

boolean

No

Get all available hard tokens.

soft_token boolean No Get soft tokens.

status

string

No

Applicable status can be one of the following:

  • disable
  • enable
  • transfer
  • others

Note: The status field applies only when you set soft_token=True

user_id

string

No

The user ID.

temp_token

boolean.

No

Get temporary token

token_sn

string

No

The serial number of the token.

Successful response fields:
Field name Response content Description
sn string The device's serial number.
algorithm string The token encrypt algorithm.
user_id string The user ID.
username string The username.
realm_id string The realm ID.
realm_name string The realm name.
platform string The platform to which the token is sent. It could be ‘iOS’, ‘Android’, ‘Windows’, or ‘unknown’.
registration_id string The registration ID that associates the token with a specific device.
Response codes:
Code Response Description
200 OK Token info has been returned.
404 Not Found No token matches the filter
Example request body:
{
   "soft_token":"true",
   "status":"enabled"
}
Example of successful response body:
[
   {
      "sn":"abcdef",
      "algorithm":"TOTP",
      "user_id":"12345678-abcd-efgh-1234-xxxxxxxxxxxx",
      "username":"abc",
      "realm_id":"12345678-abcd-efgh-1234-xxxxxxxxxxxx",
      "realm_name":" root",
      "platform":"iOS",
      "registration_id":"abcd1234efgh5678"
   }
]

GET

URI:
  • /api/v1/token
Input fields:
Field name Type Required

Description

available

boolean

No

Get all available hard tokens.

soft_token boolean No Get soft tokens.

status

string

No

Applicable status can be one of the following:

  • disable
  • enable
  • transfer
  • others

Note: The status field applies only when you set soft_token=True

user_id

string

No

The user ID.

temp_token

boolean.

No

Get temporary token

token_sn

string

No

The serial number of the token.

Successful response fields:
Field name Response content Description
sn string The device's serial number.
algorithm string The token encrypt algorithm.
user_id string The user ID.
username string The username.
realm_id string The realm ID.
realm_name string The realm name.
platform string The platform to which the token is sent. It could be ‘iOS’, ‘Android’, ‘Windows’, or ‘unknown’.
registration_id string The registration ID that associates the token with a specific device.
Response codes:
Code Response Description
200 OK Token info has been returned.
404 Not Found No token matches the filter
Example request body:
{
   "soft_token":"true",
   "status":"enabled"
}
Example of successful response body:
[
   {
      "sn":"abcdef",
      "algorithm":"TOTP",
      "user_id":"12345678-abcd-efgh-1234-xxxxxxxxxxxx",
      "username":"abc",
      "realm_id":"12345678-abcd-efgh-1234-xxxxxxxxxxxx",
      "realm_name":" root",
      "platform":"iOS",
      "registration_id":"abcd1234efgh5678"
   }
]