Client API¶
The Zscaler client wrapper and authentication handling.
Client Configuration¶
The client uses OneAPI authentication through ZIdentity. All Zscaler
products are reached through the unified zscaler.ZscalerClient.
OneAPI Authentication¶
Parameter |
Description |
Environment Variable |
|---|---|---|
|
Zscaler API Client ID |
|
|
Zscaler API Client Secret |
|
|
Zscaler Customer ID (required when calling ZPA tools) |
|
|
Zscaler Vanity Domain |
|
|
PEM-encoded private key for JWT auth (alternative to |
|
|
Cloud override (e.g. |
|
Usage Examples¶
OneAPI Client¶
from zscaler_mcp.client import get_zscaler_client
# Using environment variables
client = get_zscaler_client()
# Using explicit parameters
client = get_zscaler_client(
client_id="your_client_id",
client_secret="your_client_secret",
customer_id="your_customer_id",
vanity_domain="your_vanity_domain",
)
# JWT-based auth (private key in place of client secret)
client = get_zscaler_client(
client_id="your_client_id",
private_key="-----BEGIN PRIVATE KEY-----...",
customer_id="your_customer_id",
vanity_domain="your_vanity_domain",
)