I want to integrate my application with Salesforce. Some of my users have Salesforce accounts, and I want them to be able to sync their data in Salesforce with my system. I decided to use the REST API to tackle the integration. There are 2 possible scenarios for me:

-Username/Password flow. It is not what I would want. I get access to all their data and realistically none of my users would agree to give access to all their data.

-User Agent flow. I am planning on creating a Connected App, pack it, and redistribute it with my clients.

I would like to stick with the User Agent flow. Just wanted to ask if this was the way to go, since I am relatively new to Salesforce Integrations.

Thank you for all your help in advance!


1 Answer 1


Assuming your app is either on a mobile device or the desktop, then, yes, user agent flow is your best option. If it's a web app, however, you should look at web server flow.

  • Thanks for the info. How would I distribute the settings I have in the Connected App I created with my Developer account? I am still not getting how this works... Again, thanks a lot for your help!
    – idelara
    Sep 29, 2016 at 19:11
  • Great question! The answer is, you don't need to! See salesforce.stackexchange.com/a/36973/67
    – metadaddy
    Sep 29, 2016 at 21:51
  • Thanks for answering my previous question. I have another one. As said in my question, I want to bridge my users' data to my application, that is the purpose of the Connected App. Ideally, from my web application (in PHP) I will redirect the user to log into salesforce with their credentials, get the token from the chosen flow, and I will be able to make requests to their Salesforce instance and obtain their data. Am I on the right track? How do you publish a Connected App. I read developer.salesforce.com/page/… but it is still unclear. Thanks!
    – idelara
    Sep 29, 2016 at 23:05
  • IIRC, you package it for distribution on the AppExchange: help.salesforce.com/… BTW - asking new questions in comments doesn't get them much exposure. Better to hit the 'Ask Question' link at the top of the page to actually ask a new question.
    – metadaddy
    Sep 29, 2016 at 23:11
  • Apparently packaging an App is a legacy feature. I found this article that says so. salesforce.stackexchange.com/questions/134357/… Sorry, I will post a different question next time.
    – idelara
    Sep 29, 2016 at 23:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .