Skip to content

Instantly share code, notes, and snippets.

@pramodya1994
Created October 21, 2019 11:23
Show Gist options
  • Save pramodya1994/cc1e244b2b82fa31f942973cee9d5c11 to your computer and use it in GitHub Desktop.
Save pramodya1994/cc1e244b2b82fa31f942973cee9d5c11 to your computer and use it in GitHub Desktop.
Ballerina Salesforce Configuration
import wso2/sfdc46;
import ballerina/config;
sfdc46:SalesforceConfiguration salesforceConfig = {
baseUrl: config:getAsString("BASE_URL"),
clientConfig: {
accessToken: config:getAsString("ACCESS_TOKEN"),
refreshConfig: {
clientId: config:getAsString("CLIENT_ID"),
clientSecret: config:getAsString("CLIENT_SECRET"),
refreshToken: config:getAsString("REFRESH_TOKEN"),
refreshUrl: config:getAsString("REFRESH_URL")
}
}
};
sfdc46:Client salesforceClient = new(salesforceConfig);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment