Setting authentication for calling API from SFDC

To simplify the authentication, we will use a named credential in Salesforce and auth settings to keep it configurable. Note that this is not scalable, but it's a quick way to integrate Salesforce with Google for the purposes of demonstration only. You can use a service account or set up a full OAuth 2.0 if you are considering a scalable approach.

The steps to authorize Salesforce to access the Google Prediction API are as follows:

  1. Generate a client ID and client secret via the Google Auth screen. To generate this, navigate to the console URL ( Choose the subtab Oauth consent screen and fill in the Product name shown to users as Salesforce ...

Get Learning Salesforce Einstein now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.