Elaborating on this, every OPC UA client I've seen does basically the same "two step" connection:
- Connect, call GetEndpoints, disconnect.
- Connect to one of the endpoints returned by 1, create a Session, activate Session, do stuff with Session.
The "endpoints" returned by the GetEndpoints service are an EndpointDescription structure containing things like the endpoint URL, security configuration, the server certificate, available authentication methods, etc...
Assuming one of the endpoints matches your criteria, you select one and then connect to it with the intention of creating and activating a Session to work with.
The boneheaded mistake many client developers make is that they ignore the endpoint URL returned in the EndpointDescription selected after step 1, assume it's the same URL they used in step 1, and then carry on with step 2 using the wrong endpoint URL.
In many cases it's the same, but it's not required to be, and it's not the same in the configuration Ignition uses by default where unsecured discovery services run at a separate endpoint.