Hello @ALAN PINTOR ,
you are connecting to an Azure IoT Central device.
this device needs to be registered there. Then you are able to see the connection information like this:
In the code you shared, I do not see the input of the Scope ID, etc.
What I see is a connection string. This is perfect for an Azure IoT Hub, a PaaS solution used by Azure IoT Central in the underlying logic. The IoT Hub is not publically accessible from the outside, though.
To give a bit more context, the credentials seen above are related to the Azure Device Provisioning service, also a PaaS service, and part of the Azure IoT Central underlying logic.
Via the DPS service, the IoT Hub service is selected for device-to-cloud communication.
So you need to find a DPS SDK (and code example) using DPS access.
If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.