Write or Update Config.toml with Salesforce Credentials
sf_write_config_tomlOverwrites Config.toml in an existing Ballerina project with fresh Salesforce OAuth2 credentials for credential rotation. Auto-detects sandbox from instance URL and sets secure file permissions.
Instructions
Overwrites Config.toml in an existing Ballerina project with fresh Salesforce OAuth2 credentials. Useful for rotation. Sandbox is auto-detected from sf_base_url. File is written with mode 0600 (owner read/write only).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | Path to the Ballerina project directory | |
| sf_client_id | Yes | Salesforce Connected App Consumer Key (Client ID) | |
| sf_client_secret | Yes | Salesforce Connected App Consumer Secret (Client Secret) | |
| sf_refresh_token | Yes | Salesforce OAuth2 Refresh Token obtained after authorization | |
| sf_base_url | Yes | Salesforce org instance URL, e.g. https://myorg.my.salesforce.com (sandbox auto-detected from hostname) |