# MX

![MX_Logo.png](https://assets.relyanceuat.xyz/images/docs/13461314650893/13460183278989.png)
MX is an online tool that offers open finance APIs to enable companies to do more with financial data. It helps to securely verify data, enhance it with the most robust data engine, optimize connectivity, and securely connect to and verify consumer financial data.

In order to integrate MX with Relyance AI you will need **API Key** and **Client ID**.

#### In MX:

1. Login to your MX account.
2. On the **Home** page, you will see your **API Key** and **Client ID**. Copy these values to be used in Relyance.

![MX-3.png](https://assets.relyanceuat.xyz/images/docs/13461314650893/13461244675853.png)

#### 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 **MX** integration card and click it to open its connections.
6. Under **Authentication Method**, choose **Custom / Production**.
8. Paste the **API Key** and **Client ID** into their respective fields.

![MX-1.png](https://assets.relyanceuat.xyz/images/docs/13461314650893/13461099822733.png)

The **Authentication** step asks for:

- **API Key**: required; held as a secret.
- **Client ID**: required.
- **Subdomain (either 'api' or 'int-api')**: required.

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

![MX-2.png](https://assets.relyanceuat.xyz/images/docs/13461314650893/13461070344205.png)

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

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

## If the connection reports Connected but returns nothing

These are the ways this integration comes back empty without reporting an error. Generated from the integration catalog, so it tracks what the connection actually asks for.

1. **A credential rotated at the vendor is not picked up here.** **API Key** is stored when you save the connection, so regenerating the value at the vendor breaks the next scan until it is re-pasted here. Recording the expiry on the connection means Relyance warns you before it lapses.
2. **Check the address fields before suspecting the credentials.** **Subdomain (either 'api' or 'int-api')** identifies which tenant, region or host to talk to. A wrong value there fails authentication and looks exactly like a bad secret.

<!-- failure-modes:end -->

<!-- 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" "mxtechnologies" {
  vendor = "mxtechnologies"
  name   = "<your connection name>"

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

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

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