All docs This doc

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


  1. Create a developer account for Salesforce via
  2. Navigate to Setup -> Create -> Apps and in the Connected Apps section, click New to create a new connected application.
  3. To create a new app, fill the basic information, click Enable OAuth Settings to open the API section, and add the scope and the callback. Once done, save the configurations. You can see some example values in the following screenshot:

  4. Note your Consumer Key and under API (Enable OAuth Settings).
  5. Replace the placeholders (i.e., <your_client_id> and <your_redirect_uri>) of the following URL with the values that you created earlier and view the URL using a web browser.

    Code Block<your_client_id>&redirect_uri=<your_redirect_uri>
  6. Approve the application to access your salesforce account and note that the browser will redirect redirects you to the call-back URL (redirect URL):
  7. From the call-back URL, extract the authorization code.

  8. Send a direct POST request to the authorization server using the following request. Be sure to change the values here to the actual values that you got earlier.

    Code Block<your_client_id>&client_secret=<your_client_secret>&redirect_uri=<your_redirect_uri>&format=json


    In the above request, you can set the format as urlencoded, json or xml to get the response in one of the three formats.

  9. From the response that you get, extract the accessToken to access Salesforce via the created app. You also get a refreshToken to renew the accessToken when it expires.