Configure S4S Analytics Web Service API Key
Overview
The S4S Analytics web service requires an API key to be sent with each request. The key in the request is checked and if valid the call to the web service method is allowed otherwise it is blocked. The API key needs to be configured in both Sitecore and Salesforce.
Configure Sitecore
The API key for the service is stored in the S4S Analytics configuration file S4SAnalytics.config. Generate a new GUID to be the API key and set the value of the S4S.Analytics.ApiKey setting to the generated GUID.
<setting name="S4S.Analytics.ApiKey" value="16CF5A8F-BE21-4613-880B-1526FDF9D823" />
Configure Salesforce
The API key stored in the configuration is Sitecore needs to be entered into the S4S Analytics package custom settings.
- Setup » Build » Develop » Custom Settings (Salesforce Classic)
- Setup » Platform Tools » Custom Code » Custom Settings (Lightning)
- Click Manage in front of S4S Hierarchy Settings
- Enter the API key stored in the S4S.Analytics.ApiKey setting in Sitecore into the Web Service API Key field in the S4S Analytics package custom settings
- Click Save
Next Step
Configure S4S Analytics Client Certificate