Secure Connection on LocalHost (C API)

Do you have a server certificate installed on the broker? Managing Server Certificates

Have you enabled/opened the secure port, 55443?

You can check the “details” of the Message VPN Services tab, make sure that it’s showing “Up”: