Introduction:

Postman is a stupendous and robust API development environment. Using it, you can easily and quickly test your Salesforce APIs, examine their responses, and do many other things. But to do this, you must connect this amazing tool with Salesforce. However, this is not a simple thing to do, especially if you are a beginner. So, today, we are going to teach you how you can connect Postman with Salesforce.

How Can I Connect Salesforce with Postman for Testing Your APIs?

Follow these steps to connect Salesforce with Postman for testing your APIs

  1. Visit the salesforce.org website and log into your account.
  2. Now navigate to the setup section and type “App” in the search bar.
  3. Next, select the “Apps” option, which is present under the “Build” section.
  4. Now navigate to the “Connected apps” section and hit “New.” A new page will open on your screen.
  5. Next, enter the name of your app in the “App name” field.
  6. Now enter your email id in the “Contact Email” field.
  7. Next, navigate to the “API (Enable OAuth Settings)” section. To learn about these settings in more detail, feel free to join the Postman Online Course.
  8. Now select the “Enable OAuth Settings” checkbox.
  9. Next, enter the following URL in the “Callback URL” field: “https://www.salesforce.com.”
  10. Now navigate to the “OAuth Scopes” section.
  11. After that, select the “Access and manage your data (API)” option.
  12. Next, tap on it and then tap on the “Add” button to move it to the “Selected OAuth Scopes” section.
  13. Now click/tap on the “Save” button to save your made changes.
  14. After that, tap or click on the “Continue” button/option. Now you will see your “Consumer Key” and “Consumer Secret” on your screen under the “API section.”
  15. Next, go to your Postman workspace.
  16. Now to connect Postman with Salesforce, tap on the “Authorization” section.
  17. Now you have two options for connecting Postman to Salesforce (Authorization Code Flow and Username Password Flow). We are going to use the “Username Password Flow” option for connecting the tool to Salesforce.
  18. Next, you need to get an access token. To do this, enter the following URL in the URL field: “https://login.salesforce.com/services/oauth2/token.”
  19. Now select the POST request method in the tool.
  20. Next, tap on the “Body” option.
  21. Now select the “form-data” radio button.
  22. Next, you have to submit the following details in their respective fields:
  • Username: <your username for Salesforce.org>
  • Password: <your Salesforce.org login password>
  • Grant_type: “Password”
  • Client_id: <Consumer Key of your app>
  • Client_Secret: <Consumer Secret of your app>
  1. Now hit “Send” for sending a request to your Salesforce app and getting an access token. Note: If you get an error after sending the request, then you will have to add your security token along with the password with your request. If you don’t have one, then you will have to generate it. To do this, go to your Salesforce user account.
  2. Next, tap on your username and then tap on the “My settings” option.
  3. Now enter/type “Reset” in the search bar, and you will see the “Reset My Security Token” option on your screen.
  4. Next, tap on the “Reset My Security Token” option to receive a new security token via email.
  5. Now copy your security token add it to Postman. To do this, go to the “Password” field and add your security token to it. For example: If your password is “Irock” and your security token is “45678”, then you have to type “Irock45678” in the “Password” field.
  6. Finally, hit the send button to send a request to your Salesforce app and receive an access token.

Conclusion:

Connecting Postman to Salesforce is not that difficult. Anyone can easily perform this task if he follows all the instructions of this guide properly. So, carefully follow all the above instructions if you want to connect Salesforce to Postman. However, if you wish to learn about both solutions in more detail, feel free to join the Postman Training in Noida.