All Products
Search
Document Center

Alibaba Cloud SDK:Configure HTTPS requests

Last Updated:Feb 28, 2026

The V2.0 SDK sends all requests over HTTPS by default. Two parameters control the communication protocol and SSL/TLS certificate verification.

Parameters

ParameterClassTypeDefaultDescription
ProtocolAlibabaCloud.OpenApiClient.Models.ConfigString"HTTPS"Communication protocol. Valid values: HTTPS, HTTP.
IgnoreSSLAlibabaCloud.TeaUtil.Models.RuntimeOptionsBooleanfalseSkip SSL/TLS certificate verification. true: skip verification. false: verify certificates.

Set the communication protocol

To change the protocol, set Protocol in Config. For secure data transmission, use HTTPS.

var config = new AlibabaCloud.OpenApiClient.Models.Config
{
    // Other configurations are omitted.
    Protocol = "HTTPS", // Valid values: HTTPS, HTTP. Default: HTTPS.
};

Skip SSL/TLS certificate verification

The SDK verifies SSL/TLS certificates by default when you access services over HTTPS. If your environment lacks the required certificates, verification fails with a certificate error.

To skip certificate verification in a test environment, set IgnoreSSL to true in RuntimeOptions:

AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions
{
    // true: skip certificate verification. false: verify certificates (default).
    IgnoreSSL = true,
};
Important

Always enable SSL/TLS certificate verification in production environments.