Devices

Path:/directory/v3/devices

This endpoint provides management of Directory User Device linking and un-linking.

POST

Begins the process of linking a Device to a Directory User.

Request

Requests will be a JWE encrypted JSON payload with the following attribute:

identifier (string):The Directory User Identifier of the Directory User for which you wish to link a Device.
ttl (number) [optional]:The custom expiration time for the linking code returned in the response. The ttl can be an integer value between 300 and 86,400 seconds. The default value is 86,400 seconds, or one day, if the attribute is not provided.

Example:

{"identifier": "my-unique-user-identifier", "ttl": 300}

Response

Responses will be a JWE encrypted JSON payload consisting of an array of Devices with the following attributes:

code (string):A unique linking code provided to the user to allow for manual entry when linking a device.
qrcode (string):The URL to a QR Code image that represents the provided linking code.

Example:

[
    {
        "code": "abcefgh",
        "qrcode": "https://api.launchkey.com/public/v3/qr/abcefgh",
    }
]

DELETE

Unlinks, or deletes, a single Device for a Directory User.

Request

Requests will be a JWE encrypted JSON payload with the following attributes:

identifier (string):The Directory User Identifier of the Directory User in order to retrieve a list of Devices.
device_id (string):The Device ID of the User’s Device to unlink.

Example:

{"identifier": "my-unique-user-identifier", "device_id": "5d1acf5c-dc5d-11e7-9ea1-0469f8dc10a5"}

Response

There is no response data.

User Contributed

LaunchKey links to user contributed code as a resource to its community. LaunchKey does not in any way guarantee or warrant the quality and security of these code bases. User contributed code is supported by the creators. If you do find a link from the site to user contributed code that is malicious or inappropriate in any way, please report that link to LaunchKey immediately and we will investigate the claim. Submit any issue to LaunchKey support at https://launchkey.com./support. ×