Appearance
SendGrid
Pre-requisites
- Administrator
Getting your Sendgrid API Key
You'll now be asked for your SendGrid API key. Navigate to https://app.sendgrid.com/settings/api_keys.
Click on Create API Key.
Enter an API Key Name, select Restricted Access and Select User Account Read Access. Click Create and View.
Copy the API Key and store it somewhere safe for entering into the Truto interface later.
Because Sendgrid doesn't have the necessary user interface to grant the teammates.read scope to the API Key, we'll have to do that using their API. So generate a similar API token that you did just now but with Full Access to modify the API Key we generated in the previous steps.
Then make a note of the API Key ID you generated in step 7.
Run the following cURL command to modify the scopes of the API Key,
bash
curl --location --request PUT 'https://api.sendgrid.com/v3/api_keys/<truto_demo_api_key_id>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <full_access_api_token>' \
--data '{
"name": "Truto Demo",
"scopes": ["teammates.read"]
}'
In the command above, truto_demo_api_key_id
is the ID of the API Key generated in step 7, full_access_api_token
is the API Key with Full Access.