1

I need to create BulkConnection for bulk API into salesforce.

We can able to create BulkConnection using ConnectorConfig with basic SOAP authentication.

Code is below,

        ConnectorConfig config = new ConnectorConfig();

        config.setUsername("USERNAME");
        config.setPassword("PASSWORD+TOKEN");


        config.setCompression(true);
        config.setTraceFile("traceLogs.txt");

        config.setTraceMessage(true);
        config.setPrettyPrintXml(true);

        config.setAuthEndpoint("https://login.salesforce.com/services/Soap/u/39.0");
        PartnerConnection connection = new PartnerConnection(config);

        String soapEndpoint = config.getServiceEndpoint();
        String apiVersion = "39.0";
        String restEndpoint = soapEndpoint.substring(0, soapEndpoint.indexOf("Soap/")) + "async/" + apiVersion;
        config.setRestEndpoint(restEndpoint);

        bulkConnection = new BulkConnection(config);

Above code is working fine.

But in my case, I can't able to collect username & password for each of the customer's salesforce account.

Is this possible to create BulkConnection using accestoken?..

Please give me your suggestion.

Thanks, Harish

Harish S
  • 21
  • 3

0 Answers0