secrets#

The following methods allow for interaction with the ZCC API endpoints for managing secrets.

Methods are accessible via zcc.secrets

class SecretsAPI#
get_otp(device_id)#

Returns the OTP code for the specified device id.

Parameters:

device_id (str) – The unique id for the enrolled device that the OTP will be obtained for.

Returns:

A dictionary containing the requested OTP code for the specified device id.

Return type:

Box

Examples

Obtain the OTP code for a device and print it to console:

>>> otp_code = zcc.secrets.get_otp('System-Serial-Number:1234ABCDEF')
... print(otp_code.otp)
get_passwords(username, os_type='windows')#

Return passwords for the specified username and device OS type.

Parameters:
  • username (str) – The username that the device belongs to.

  • os_type (str) –

    The OS Type for the device, defaults to windows. Valid options are:

    • ios

    • android

    • windows

    • macos

    • linux

Returns:

Dictionary containing passwords for the specified username’s device.

Return type:

Box

Examples

Print macOS device passwords for username test@example.com:

>>> print(zcc.secrets.get_passwords(username='test@example.com',
...    os_type='macos'))