Skip to main content

Configure authentication to SendGrid

Beta

This feature is in Beta. Workspace admins can control access to this feature from the Previews page. See Manage Databricks previews.

This page shows how to configure SendGrid to enable authentication from Databricks for the SendGrid connector. The SendGrid connector uses a SendGrid API key to ingest data into Databricks. Use the credentials retrieved from the steps on this page to create a Unity Catalog connection in Databricks.

Prerequisites

  • A SendGrid account on a Pro or Premier email API plan, or an Advanced Marketing Campaigns plan. Subusers are available only on these plans. For more information, see Subusers in the SendGrid documentation.
  • Administrator access to create an API key with read access to the Subusers and IP Access Management data.
  • If your account has IP Access Management enabled, the Databricks serverless egress IP addresses must be on your allowlist. SendGrid blocks API access from IP addresses that are not on the list.

Configure SendGrid

Create a SendGrid API key with read access to the Subusers and IP Access Management APIs. For more information, see API keys in the SendGrid documentation.

  1. Sign in to the SendGrid application as an administrator.
  2. In the left navigation, select Settings > API Keys.
  3. Click Create API Key.
  4. Enter a name for the key, then select Restricted Access.
  5. Grant Read Access to IP Access Management and to Subusers. These permissions let the connector read recent access attempts and enumerate subusers.
  6. Click Create & View, then copy the generated key. SendGrid shows the key value only once.
  7. Store the key securely. You enter this value as the API Key when you create a connection in Databricks.

Note the data region of your SendGrid account. EU data-residency accounts use api.eu.sendgrid.com; all other accounts use the global endpoint api.sendgrid.com. You select this region when you create the connection.

Next steps

Create a SendGrid connection in Databricks. See Create a SendGrid connection.