Fortinet white logo
Fortinet white logo

POST

POST

Temporary Token generation URI:
  • /api/v1/token/temp

Input fields:
Field name Type Required Description
user_id string Yes The user ID
auth_method string No

The authentication method, which can be either of the following:

  • ‘Email’

  • ‘SMS’

expired_at string No The expiration date and time for the temporary token. If left as Null, the token won’t expire on its own.
Successful response fields:
Field name Type Description
sn string The temporary token serial number.
expired_at string The expiration date and time for the temporary token.
auth_method string

The authentication method, which can be either of the following:

  • ‘Email’

  • ‘SMS’

user_id string The user ID.
username string The username.
realm_id string The realm ID.
realm_name string The realm name.
Response codes:
Code Response content Description
201 OK A temporary token has been generated.
400 Bad Request
  • You cannot add temporary token for user.

  • You cannot set temporary token’s auth_method to ‘SMS’.

  • User auth method must be FTM/FTK to add a temporary token.

  • Cannot set auth method to SMS due to the user's invalid mobile number.

  • Expiration date must be set as a valid date.

404 Not Found User does not exist.
Example request body:
{
   "user_id":"12345678-abcd-efgh-1234-xxxxxxxxxxxx",
   "auth_method":"Email"
}
Example of successful response body:
{
   "sn":"TMP8D04X81LH12ZP",
   "expired_at": None,
   "auth_method":"Email",
   "user_id":"12345678-abcd-efgh-1234-xxxxxxxxxxxx",
   "username":"abc",
   "realm_id":"12345678-abcd-efgh-1234-xxxxxxxxxxxx",
   "realm_name":"FG101ETK18001260-root"
}

POST

POST

Temporary Token generation URI:
  • /api/v1/token/temp

Input fields:
Field name Type Required Description
user_id string Yes The user ID
auth_method string No

The authentication method, which can be either of the following:

  • ‘Email’

  • ‘SMS’

expired_at string No The expiration date and time for the temporary token. If left as Null, the token won’t expire on its own.
Successful response fields:
Field name Type Description
sn string The temporary token serial number.
expired_at string The expiration date and time for the temporary token.
auth_method string

The authentication method, which can be either of the following:

  • ‘Email’

  • ‘SMS’

user_id string The user ID.
username string The username.
realm_id string The realm ID.
realm_name string The realm name.
Response codes:
Code Response content Description
201 OK A temporary token has been generated.
400 Bad Request
  • You cannot add temporary token for user.

  • You cannot set temporary token’s auth_method to ‘SMS’.

  • User auth method must be FTM/FTK to add a temporary token.

  • Cannot set auth method to SMS due to the user's invalid mobile number.

  • Expiration date must be set as a valid date.

404 Not Found User does not exist.
Example request body:
{
   "user_id":"12345678-abcd-efgh-1234-xxxxxxxxxxxx",
   "auth_method":"Email"
}
Example of successful response body:
{
   "sn":"TMP8D04X81LH12ZP",
   "expired_at": None,
   "auth_method":"Email",
   "user_id":"12345678-abcd-efgh-1234-xxxxxxxxxxxx",
   "username":"abc",
   "realm_id":"12345678-abcd-efgh-1234-xxxxxxxxxxxx",
   "realm_name":"FG101ETK18001260-root"
}