API v2: UAG - OTP Generation πŸ†•ΒΆ


Data StructuresΒΆ

OtpModelΒΆ

Attribute

Type

Required

Description

account_id

string

yes

The account for which the OTP is generated.

safe_id

string

yes

Safe identifier.

listener_id

string

If webclient == false

Required if OTP is generated for RDP native client use.

server_address

string

Valid IPv4, IPv6 or hostname.

port

number

Connection port. Defaults to standard port if not set.

account_login

string

Login for the account.

webclient

boolean; default value false

Whether the OTP is for a Webclient.

Retrieve Available Attributes of the OtpModelΒΆ

Request

Method

GET

Path

/api/v2/objspec/otp

GET /api/v2/objspec/otp

Example Request

curl -s -k -X GET \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  'https://10.0.214.98/api/v2/objspec/otp'

Generate OTPΒΆ

Request

Method

POST

Path

/api/v2/secret/otp

Headers

Content-Type: application/json

Body

OtpModel

POST /api/v2/secret/otp

Example Request

curl -s -k -X POST \
    -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
    -H 'Content-Type: application/json' \
    https://10.0.0.1/api/v2/secret/otp \
    -d '{"account_id": "8169529724050079750", "safe_id": "8169529724050079749","webclient":true,"server_address":"10.0.136.1","port":3389}'

Response

{
    "otp": "80434736YPxLckb4Wy_9f8Vuv7Z3OGv_",
    "result": "success"
}