3

(Crossposted from SO - https://stackoverflow.com/questions/21255608/salesforce-apex-data-loader-gui-vs-command-line-login)

I'm trying to wrap up some Upsert functionality into a simple application which will execute the Apex Data Loader to push that data to Salesforce.

I can get this working through the GUI version of the Data Loader as that just requires me to enter my username & human-readable-password.

However when I move to the commandline version, it requires an API token which most end users won't easily know/have access to.

Is there a way to generate this token automatically, based on their Human Readable password. If not, why is there this discrepency between the login mechanism from the GUI tool vs. the commandline tool.

2

Have you seen Data Loader Guide? http://na1.salesforce.com/help/pdfs/en/salesforce_data_loader.pdf

There's whole chapter around running from command line. Actually chapter and a half as encryption stuff is also mentioned in the previous chapter (batch mode).

Generally you'll have to play with the encrypt.bat script file

(I know it's a bit rude to provide link-only answer but I think the examples are very clear and it's not like the documentation will disappear ;))

P.S. Welcome on SF StackExchange!

  • 1
    As a additional note, the UI actually also generates that token and stores it in config.properties - which you typically find here: C:\Users[username]\AppData\Roaming\salesforce.com\Data Loader 26.0.0 – BritishBoyinDC Jan 21 '14 at 20:06
  • O, thx! Every day is a school day :) – eyescream Jan 21 '14 at 20:07
  • Yeah I had gone through all the documentation. Wasn't able to figure out the User Security token part though and why/when it was needed. I think I've gotten to the bottom of it now and that you're required to append it to your password when on a non-trusted network. help.salesforce.com/apex/… – Eoin Campbell Jan 22 '14 at 9:18
  • Yeah, you need the token in any API product (developers that use Eclipse IDE, some continuous integration solutions, data loader, other tools that load data). Or discuss it with your network admins and whitelist some IP ranges :) – eyescream Jan 22 '14 at 9:26
  • 1
    Cheers, got this sorted by having our customer add our dev office to the approved whitelist. – Eoin Campbell Jan 27 '14 at 13:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.