SDK API Reference / SDKContext
Interface: SDKContext
SDK context (resolved config + initialized logger) Passed to SDK classes and API clients
Properties
accessToken?
optionalaccessToken?:string
Access token for Bearer authentication (e.g., from OAuth flows) Takes precedence over apiKey when both are provided
apiKey?
optionalapiKey?:string
TD API key (format: key_id/secret) Optional when used in browser with cookie-based authentication
logLevel
logLevel:
LogLevel
Log level for SDK operations
profile?
optionalprofile?:string
TD profile name Used for profile-based usage tracking
proxy?
optionalproxy?:string
HTTP proxy URL for corporate networks with SSL inspection
Resolved from (in priority order):
- SDKConfig.proxy (explicit)
- tdx.json global config
- HTTPS_PROXY environment variable
site
site:
TDSite
TD site/region
timeout?
optionaltimeout?:number
Default timeout in milliseconds for HTTP requests. Applied to all API clients.