All Products
Search
Document Center

Alibaba Cloud SDK:Configure TLS settings in the SDK

Last Updated:Jun 16, 2026

The Alibaba Cloud SDK V1.0 for Go uses HTTPS for all API requests and validates TLS certificates by default. You can customize these settings for specific compliance requirements or isolated test environments.

Disable TLS certificate validation

Important

Disabling certificate validation is a security risk. Only use this option for testing in trusted environments. Never disable certificate validation in production code.

You can set HTTPSInsecure at the client level (for all requests) or the request level (for a single request).

Client-level configuration

Setting HTTPSInsecure on the client object applies to all subsequent requests made by that client.

// Disable certificate validation for all requests made by this client.
client.SetHTTPSInsecure(true) 

Request-level configuration

Setting HTTPSInsecure on a request object overrides the client setting for that single API call.

// Disable certificate validation for only this specific request.
request.SetHTTPSInsecure(true)