Set Up Your Environment
- Create an Einstein Platform Services Account.
- Generate a JWT access token to call the API.
When you sign up for an account, you’re prompted to log in to your Salesforce org. For this module, you use the username and password for your hands-on Trailhead Playground (TP) org. If you don’t know what a Trailhead Playground org is, or you need to find your TP username and password, check out the Trailhead Playground Management module.
After you log in, you’re prompted to allow the sign-up page to access information in your Salesforce org. Giving access lets the sign-up page retrieve some basic information such as your ID, profile, email, address, and phone number. After your account is created, you can download your key.
Navigate to the sign-up page at
Click Sign Up Using Salesforce.
On the Salesforce login page, type your Trailhead Playground username and
password and click Log In.
Click Allow so the page can access basic information,
such as your email address, and perform requests.
On the activation page, click Download Key to save the
key locally. The key file is named einstein_platform.pem. If you can’t download it, cut and paste
your key from the browser into a text file and save it as einstein_platform.pem.
cURL is a free command line tool for getting or sending data using URL syntax. It comes in handy when working with REST endpoints. You use cURL throughout this module to make calls to the Einstein Intent API.
If you already have cURL installed, you can skip this step. The Linux or Mac OSX operating systems have cURL installed by default, but if you use Windows you have to install it yourself.
To install cURL, go to https://curl.haxx.se/download.html. Download and install the version for your operating system.
- In your browser, navigate to the token page at https://api.einstein.ai/token.
- Type your email address. This is the email address associated with your user in the Trailhead Playground org you logged in to when you signed up for an account. Be sure to use your email address and not your Trailhead Playground username.
- Click Choose File or Browse and navigate to the einstein_platform.pem file you downloaded when you signed up for an account.
- Set the Expiration in Mins to 90. The token will expire after 90 minutes, which is enough time to complete this module. If you want your token to be valid longer, increase the number of minutes.
Click Get Token, and save the token in a text file or
somewhere you can access it.