# Pusher

![Pusher-logo.svg](https://assets.relyanceuat.xyz/images/docs/6566771006989/6565884687373.svg)
Pusher is a web-hosted API service that makes it super-easy to add real-time data and functionality to web and mobile applications. It works as a real-time communication layer between the server and the client and maintains persistent connections at the client using WebSockets, as and when new data is added to your server.

In order to integrate Pusher with Relyance AI you will need an **app_id**, **key**, **secret**, and **cluster** info.

#### In Pusher:

![Pusher-1.png](https://assets.relyanceuat.xyz/images/docs/6566771006989/6566655785485.png)
1. Login to your Pusher account.
2. Click on a channel in the dashboard.

3. Click on **App Keys** and **Create a new key and secret**.

![Pusher-2.png](https://assets.relyanceuat.xyz/images/docs/6566771006989/6566609637261.png)

4. Copy the values of **app_id**, **key**, **secret** and **cluster** fields to be used in Relyance AI.

#### 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 **Pusher** integration card and click it to open its connections.
6. Under **Authentication Method**, choose **Custom**.
8. Paste the **app_id**, **key**, **secret**, and **cluster** info into their respective fields.

![Pusher-3.png](https://assets.relyanceuat.xyz/images/docs/6566771006989/6566703723533.png)

The **Authentication** step asks for:

- **app_id**: required.
- **key**: required; held as a secret.
- **secret**: required; held as a secret.
- **cluster**: required.

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

![Pusher-4.png](https://assets.relyanceuat.xyz/images/docs/6566771006989/6566676417933.png)

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

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

  auth = {
    method = "app-credentials"
    params = {
      app_id = "<app_id>"
      cluster = "<cluster>"
      data_storage_location = "us"
    }
    # Secret fields are write-only: sent to Relyance, never stored in state.
    secrets_wo = {
      key = var.pusher_key
      secret = var.pusher_secret
    }
    secrets_wo_version = 1
  }

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

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