Salesforce OAuth Configuration in Integration and Flow Editor


    This article describes the successive way to construct an OAuth app in Salesforce, token generation and configuring an account in both flow editor and Integration.


  • ·  User must have a developer account created in
  •    Working flow editor tenant.
  •    Working integration tenant.


1. Create a Connected App in Salesforce

2. Generate an Access Token and Refresh Token using REST client

3. Configuring a Salesforce Account in flow editor.

4. Configuring a Salesforce Account in integration.


 1. Login to Salesforce

 2. In upper-right corner click on “Setup

 3.  In the left-hand pane, find Apps in quick find box (Build > Create >Apps)

 4.  In the Connected Apps pane, click on New field



 5. Fill out the Basic information like "Connected App Name", "API Name" , "Contact Email" and select Enable OAuth Settings under API (Enable OAuth Settings) field

 6. In the Callback URL field, enter the callback URL



 7. In the Selected OAuth Scopes field, add all “Available OAuth Scopes


 8. Click the Save button to save the new Connected App and “continue” to take effect on the server.

 Note: Allow from 2-10 minutes for your changes to take effect on the server before using the connected app.

 9. In the Connected Apps list, find the App that you just created, and then click Manage under API (Enable OAuth Settings) note down 

 Consumer Key (client id) and click on  “click to reveal” to view Consumer Secret (client secret)


 10. To generate authorization code: Go to Chrome browser and input the below url



    Note: find your instance name from the login url. Ex: instance name here is ap15


11. The user gets logged into Salesforce, it redirects the user to the approval page. The user has to approve the access by hitting “allow

 12. After the user approves access, the user is redirected to the URI specified in, returns a query string containing code     (authorization code) and state.           

 13. In Rest Client workspace (Ex: Postman) Set your HTTP request to POST ,input in the request url





 Note: Authorization code that the consumer must use to obtain the access and refresh tokens.The authorization code expires after 15 minutes.

 14. After filling in, the parameter values from Step 9&12, Click “SEND” button.

 15. Sample response looks as below containing Access and Refresh tokens

 16. Login to  and switch to flow editor from the app launcher

 17. Navigate to “Applications” > search for “Salesforce CRM” application


 18. Click on “Add New Account” tab > specify the name of the Account


 19. Select the Authentication Type from the drop down as “OAuth V2.0(authorization code flow)”


 20. Fill the values for the parameters, generated from the above steps:- instanceClient id , Client secretAccess TokenRefresh Token

 21. Save the connection.

Note: Follow the Steps from 22 to configure a Salesforce Account in Integration

 22. Log in to integration tenant and create a workflow. Inside the workflow drag the Salesforce CRM app from the menu and click on the “setting” button.


 23. Choose the action from the predefined operation drop-down menu and click on the “+” sign to configure the new connection.

 24. Fill all the necessary credentials details and click on the Save button.

 25. Save the connection.

 26. Select the operation > select the buissness object > select fields > run the action created, the integration runs successfully.

I struggled with step 13 to post an authorization request and always failed with a message “invalid authorization code salesforce”.
Only to find that the given url from the callback had URL encoded characters like %25.
My code ended as %253D%253D which I replaced with %3D%3D.
Replacing the returned URL encoded characters with its equivalent characters made authorization post successful.