public DirectoryUserDeviceLinkData LinkDevice(string userId, int?ttl = null) { var request = new DirectoryV3DevicesPostRequest(userId, ttl); var response = _transport.DirectoryV3DevicesPost(request, _directoryId); Guid?deviceID = Guid.TryParse(response.DeviceId, out Guid deviceGUID) ? (Guid?)deviceGUID : null; return(new DirectoryUserDeviceLinkData(response.Code, response.QrCode, deviceID)); }