I noticed from the ESRI website that "AddToolbox also supports working with secured ArcGIS online services", and the example is as below:
import arcpy
tbx = "http://logistics.arcgis.com/arcgis/services;World/ServiceAreas;UseSSOIdentityIfPortalOwned" arcpy.AddToolbox(tbx)
The codes work, but my arcgis server service uses self-signed certificate. Thereby, when I run the codes, it always pops up the "security alert" window. Is there anyway to let the arcpy.AddToolbox ignore or trust the self-signed certification? Thanks
PS. I use ArcGIS Server 10.4