4

We plan to have an application on an internal server that fetches data from one source, manipulates it, sends it to Salesforce using Rest APIs.

I have some questions: Do I need to have a connected app? If so, what is the callback url? I have taken a few trailheads and understand that the callback URL is used for human interaction but this is all automated and I'm not sure that there is a URL as such.

  • If you are planning to use REST APIs then Yes, you will need a connected app. – Jayant Das Jan 4 at 20:44
  • Yes it is REST. (updating post) – SeanGorman Jan 4 at 20:45
  • The callback URL is used to provide you with an OAuth token. It will be specific to your local application. OAuth does not need to involve user interaction. The JWT flow, for example, does not. – David Reed Jan 4 at 20:49
4

Do I need to have a connected app?

Yes. If you are using REST API to integrate with Salesforce, then you will need a Connected App.

If so, what is the callback url? I have taken a few trailheads and understand that the callback URL is used for human interaction but this is all automated and I'm not sure that there is a URL as such.

Callback URL is the URL where you want the access token code to be sent to after successful authentication. It can be any URL or even a localhost URL on a specific port. There is not necessarily a human interaction required here. You just need a URL where you can receive the token after the authentication. So if you are authenticating using an API, you can always specify a callback URL pointing back to your application which can programmatically accept the incoming token.

Notice this from the Digging Deeper into OAuth 2.0 in Salesforce documentation (emphasis mine):

Apps that use OAuth can also directly authenticate and access Salesforce resources without a user’s presence.

This is how it is defined here on the documentation:

Enter a Callback URL. Depending on which OAuth flow you use, this is typically the URL that a user’s browser is redirected to after successful authentication. As this URL is used for some OAuth flows to pass an access token, the URL must use secure HTTP (HTTPS) or a custom URI scheme. Separate multiple callback URLs with line breaks. The callback URL field has a limit of 2000 characters, cumulatively. If you enter several URLs and they exceed this limit, configure another connected app to manage more callback URLs.


You should go through the documentation to get more details on the setup for Connected Apps. Good places to start are:

  • Thanks for this. I have read 'most' of these resources but the emphasis seems geared towards human interacted processes. – SeanGorman Jan 4 at 21:37
  • 1
    I agree. I have struggled on this topic for a long time until I knew what it was. – Jayant Das Jan 4 at 21:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.