Basic Java sample for Salesforce REST API

This sample code includes a very simple way to get an AccessToken and gets you started very quickly.

Prerequisites

Steps

  1. Create a file clientConfig.properties and setup your clientId and clientSecret
  2. Run GetAccessToken and follow the instructions. This create a file accessToken.properties that contains an access token!
  3. Run Demo

It is that simple!

Details

The GetAccessToken starts a HttpsServer using a dummy certificate. This means you will get certificate warnings at localhost, but these can safely be ignored.