Connecting with Salesforce
Last updated
Was this helpful?
Last updated
Was this helpful?
In order to make calls against the Salesforce Rest API you need to provide ts-force with an accessToken
and an instanceUrl
. How you obtain the access token is left up to you. ts-force
does provide some functions for obtaining access tokens for common oAuth flows.
The Rest
class is responsible for making requests against Salesforce. The generated classes and Composite API clients use this class to make requests.
If you are only working with a single connection with straight-forward use cases you might find it more convenient to set the "default" configuration:
If you need more control or are using multiple Salesforce orgs then you'll need to explicitly setup Rest
clients.