Vouchers

async OPNsenseClient.generate_vouchers(data)

Generate captive portal vouchers from a voucher server.

Parameters:

data (MutableMapping[str, Any]) – Voucher generation options passed to OPNsense. Include voucher_server to choose a specific server when more than one provider exists.

Returns:

Generated vouchers with keys ordered for

consumers and with expirytime converted to a timestamped datetime plus expiry_timestamp and human-readable validity_str when those values are available.

Return type:

list[dict[str, Any]]