Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7730769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:18:34+00:00 2026-06-01T06:18:34+00:00

The Salesforce.com API seems to assume that you will always use the app as

  • 0

The Salesforce.com API seems to assume that you will always use the app as an active user. Their authentication methods (Session ID and OAuth) support this as they both require an authenticated user to “do something”.

What is the strategy for when you have a background app that needs access to the API? The examples that I have seen ask for your full credentials – user name, password, and security token. Not only do I not want to know or store that information, but it can change (from password policies, etc) and I’d rather not have the app break because of that.

What is the “best practice” for long lived authentication to SFDCs APIs that does not require user interaction?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T06:18:36+00:00Added an answer on June 1, 2026 at 6:18 am

    Salesforce.com API requests operate in the context of a user, identified by a sessionId (aka access_token) (unauthenticated custom APIs exposed via sites is the one exception).

    So in order to make API calls, you will need a sessionId, you can get one as you say by storing the username/password/security token and calling login (or the oauth2 username/password flow) when you need to.

    Alternatively you can use the interactive OAuth flow, which requires the user to just once authorization your application, at which point you’ll be given a long lived token called a refresh token. At any point after that you can use the oauth2 token service to get a new access_token (which can then make API calls) using just the refresh token.

    Seems like this last approach would best meet your needs, this would require just a one time user interaction to initially authorize your application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When using the SOAP API to work with salesforce.com (SFDC) it seems that the
I'm writing an API that converts actions performed by a non-technical user into Salesforce.com
SalesForce.com Rest API Authentication. Will it allow 2-legged oauth transaction
I took over a Rails app and am trying to get the Salesforce.com API
I'm looking for a list of component types that the salesforce.com Metadata API does
I have a question about fiscal date literals in the Force.com API ( http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_select_dateformats.htm
I'm currently integrating external applications in my app ex SalesForce.com. My question pertains to
salesforce plans page says that they charge per user. Well, it makes sense to
We are looking for a CRM web application and so far salesforce.com/force.com seems the
I am following this guide (http://devcenter.heroku.com/articles/omniauth-and-force-com) in hooking up Salesforce.com REST API with ruby

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.