Skip to main content

Salesforce Reader initial setup

The Salesforce Reader supports authentication with OAuth. Configure OAuth when prompted by the Striim wizard.

Configuring OAuth for Salesforce Reader

For simpler configuration, create a connection profile (see Introducing connection profiles).

Configuring OAuth for automatic authentication token renewal

The following procedure requires an active Salesforce account and a Striim app connected to Salesforce (see Create a connected app).

  1. From the connected app, get the values of the Consumer Key and Consumer Secret.

  2. In the Salesforce Reader, set the values of the Consumer Key and Consumer Secret.

  3. Generate a security token following the instructions in Reset your security token.

  4. In the Salesforce Reader, set the value of the Security token.

Configuring OAuth for manual authentication token renewal

  1. Generate an authentication token using the following command:

    curl https://login.salesforce.com/services/oauth2/token -d "grant_type=password"\
     -d "client_id=<your consumer key>"\
     -d "client_secret=<your consumer secret>"\
     -d "username=<your username>"\
     -d "password=<your password>"
  2. In the Salesforce Reader, set the value of the authentication token.

  3. Generate a security token following the instructions in Reset your security token.

  4. In the Salesforce Reader, set the value of the Security token.

Verifying Salesforce Reader configuration

Use the following cURL commands (see Using cURL in the REST Examples and curl.haxx.se) to verify your configuration and get information about available resources and sObjects.

  1. Get an access token using the Salesforce login URL.

    curl https://login.salesforce.com/services/oauth2/token -d "grant_type=password" \
    -d "client_id=<your consumer key>" -d "client_secret=<your consumer secret>" \
    -d "username=<your username>" -d "password=<your password>"
    
  2. Using the access token returned by that command, test the REST API URL for your organization. The instance is typically the first part of the URL you see in your browser when logged into Salesforce, such as "mycompany" in mycompany.salesforce.com. Alternatively, ask your Salesforce technical administrator for access to a connected app. (For more information, see Understanding the Username-Password OAuth Authentication Flow.)

    If you do not have a proxy server:

    curl https://<your Salesforce instance>.salesforce.com/services/data/ \
    -H 'Authorization: Bearer <token>'

    If you have a proxy server (change the proxy server URL to match yours):

    curl -x http://mycompany.proxy.server.com:8080/ \
    https://<your Salesforce instance >.salesforce.com/services/data/ \
    -H 'Authorization: Bearer <token>'
  3. List available REST resources and sObjects (see List Available REST Resources and Get a List of Objects).

    curl https://<your Salesforce instance>.salesforce.com/services/data/v41.0 \
    -H 'Authorization: Bearer <token>'
    curl https://<your Salesforce instance>.salesforce.com/services/data/v41.0/sobjects \
    -H 'Authorization: Bearer <token>'
    

For additional information, see Salesforce's REST API Developer Guide .