Setup OAuth to Salesforce
This article describes the two ways we have tested to setup an OAuth connection to Salesforce fro RINT.
Pre-requisiteÂ
This guide depends on that you already have a Connected App setup in Salesforce that RINT can connect to.
Follow this guide if that needs to be done:Â Setup Salesforce Connected App and API user for the integration
Steps
- Go to REST Integrations admin page (<baseurl>/secure/RestfulClientAction.jspa?view=auth)
- Click on Authentications (lock symbol)
- Select OAuth and enter a nameÂ
- Select Grant Type from the two options below
Option A - Use Grant Type: Authentication Code
Benefits no password is shared or username
- On Authorize URL enter https://login.salesforce.com/services/oauth2/authorize?response_type=code
- On Access Token URL enter https://login.salesforce.com/services/oauth2/token
- On Client ID enter the ID that came from the connected App (Setup Salesforce Connected App and API user for the integration)
- On Client Secret enter the secret that came from the connected App (Setup Salesforce Connected App and API user for the integration)
- Leave Scope blank
- Check Include stateÂ
- Click Authorize
- This will prompt you with the consent form from Salesforce, enter username and password and press Agree.
- Done! You will see that the connection was successful if you have these two green labels next to the Authorize button
AUTH CODE GRANTED
ACCESS TOKEN GRANTED
The next step is to setup a rest call that uses the above as authentication.
Option B - Use Grant Type: Resource Owner Password Credentials
Benefits - simpler
- On Access Token URL enter https://login.salesforce.com/services/oauth2/token
- On Client ID enter the ID that came from the connected App (Setup Salesforce Connected App and API user for the integration)
- On Client Secret enter the secret that came from the connected App (Setup Salesforce Connected App and API user for the integration)
- Enter Salesforce user name (the user with API access)
Enter the Salesforce password + personal security token. (Reset My Security Token)
It is very important that you enter the password+security token. example my password is abc and my security token is 123 then enter in the password field: abc123
- Leave Scope blank
- Leave Include state unchecked
- Click Authorize
- Done! You will see that the connection was successful if you have these two green labels next to the Authorize button
ACCESS TOKEN GRANTED