# Lob

![Lob-logo.svg](https://assets.relyanceuat.xyz/images/docs/10623402565005/10623197551629.svg)
Lob uses cloud software to help businesses send smarter mail, faster through automation. It provides direct mail and address verification APIs which allows businesses to send personalized mail to their customers.

In order to integrate Lob with Relyance AI you will need a **Public Api Key** and **Secret Api Key**.

#### In Lob:

1. Login to your Lob account.
2. Once logged in, go to [https://dashboard.lob.com/settings/api-keys](https://dashboard.lob.com/settings/api-keys)

![Lob-1.png](https://assets.relyanceuat.xyz/images/docs/10623402565005/10624003219597.png)

3. Copy the *Live Secret API Key* to be used as your **Secret Api Key**.
4. Copy the *Live Publishable API Key* to be used as your **Public Api Key**.

#### In the Relyance AI application:

1. Login to your Relyance account.
2. Navigate to the **Settings** Menu in the bottom left-hand side.
3. Select **Integrations**.
4. Click on the **Vendor Integration** tab.
5. Find the **Lob.com** integration card and click it to open its connections.
6. Under **Authentication Method**, choose **Custom**.
8. Paste the **Public Api Key** and **Secret Api Key** into their respective fields.

![Lob-2.png](https://assets.relyanceuat.xyz/images/docs/10623402565005/10624060713613.png)

9. Click **Authenticate**.
10. At this point, you should see the following result on the **Vendor** Integrations page:

![Lob-3.png](https://assets.relyanceuat.xyz/images/docs/10623402565005/10624103939085.png)

11. Congratulations, you are now connected to **Lob**.

<!-- terraform-examples:begin (generated from the integration catalog; do not hand-edit) -->

## Manage this integration with Terraform

Connections for this integration can be managed as code with the [Relyance Terraform provider](https://registry.terraform.io/providers/Relyance/relyance/latest). Non-secret fields go in `auth.params`; secret fields go in `auth.secrets_wo`, which is write-only — never stored in Terraform state. Rotate secrets by bumping `auth.secrets_wo_version`.

```hcl
resource "relyance_integration_connection" "lob" {
  vendor = "lob"
  name   = "<your connection name>"

  auth = {
    method = "api-key"
    params = {
      data_storage_location = "us"
    }
    # Secret fields are write-only: sent to Relyance, never stored in state.
    secrets_wo = {
      api_key = var.lob_api_key
      secret_key = var.lob_secret_key
    }
    secrets_wo_version = 1
  }

  scans = { "property-inspection" = { enabled = true } }
}
```

<!-- terraform-examples:end -->
