AboutSupportDeveloper GuideVersion 2.3.0
  • Retrieves a connection to a Salesforce org, assuming the user is currently authenticated to Salesforce and the Connected App has been previously authorized.

    Unlike connect, if a connection could not be established because the user is not authenticated to Salesforce or the Connected App has not been authorized, the function simply returns null and does not throw an error.

    Parameters

    • orgUrl: string

      The URL of the Salesforce org to connect to, which should be in the form: https://MyDomainName.my.salesforce.com.

    • consumerKey: string

      The Consumer Key of the Connected App to use for authorization.

    • scope: string[] = []

      Provide any additional OAuth scopes that may be required by your app.

    Returns Promise<null | SalesforceConnection>

    A connection, or null if the user is not authenticated to Salesforce or the Connected App has not been authorized.

    Throws

    AuthorizationError if the authorization process does not complete successfully for any reason other than the user is not authenticated to Salesforce or the Connected App has not been authorized.

    Throws

    ParameterError if invalid function parameter values are detected.

Generated using TypeDoc