---
title: Connect on your own page
description: Optionally give your integration a setup address, so an administrator finishes the connection on a page you host.
---

An integration of your own works without any page: an administrator switches it on in the admin console, and your system reports `ready`. See [Build your own integration](/guides/integrations/build-your-own).

A **setup address** is an optional extra. It adds a **Connect** button to the admin console that sends the administrator to a page you host. Use one when the connection needs something only a browser can do:

- The administrator must sign in to your system, or give consent at an external provider.
- The administrator must choose something in your system, such as which ERP company a business context books in.
- You want secrets entered on your page, and never in Hydda One.

If none of these applies, leave the setup address empty.

## The flow

```mermaid
sequenceDiagram
  actor Admin as Administrator
  participant H as Hydda One
  participant App as Your page
  Admin->>H: saves the settings
  Admin->>H: chooses Connect
  H-->>Admin: redirect to your setup address
  Admin->>App: opens the setup address
  App->>H: POST /v1/integrations/connection-references/redeem
  H-->>App: configurationId, operationalContextId and level
  App->>Admin: your sign-in, consent or form
  App->>H: POST /v1/integrations/configurations/{configurationId}/ready
  App-->>Admin: redirect to return_url
```

1. **Receive the administrator.** The browser arrives at your setup address with three query parameters: `reference`, `installation_id` and `return_url`.
2. **Redeem the reference.** Call `POST /v1/integrations/connection-references/redeem` with `reference`, using your integration's own token. The answer names the `configurationId` the administrator is connecting, its `operationalContextId` and its `level`.
3. **Do your part.** Show your sign-in, consent or form. Store what you learn against the `operationalContextId`. Check that the connection works, for example with a test call to the external system.
4. **Report the result.** Call `POST /v1/integrations/configurations/{configurationId}/ready`. If it cannot work, call `.../failed` with a `code` and a `reason`.
5. **Send the administrator back.** Redirect the browser to `return_url`. It is the integration's page in the admin console, which now shows the status you reported.

Each call is described in the [Integrations API guide](/guides/surfaces/integrations).

## Set the address

An administrator enters the setup address when creating the integration, or later with **Edit**.

It is an `https` address on your own host, with no fragment and no credentials in it. `http` is accepted for `localhost` only, for development.

With a setup address set, each configuration row in the admin console has a **Connect** button once the administrator has saved it. After a successful connection the button reads **Reconnect**.

## Rules for your page

### Trust the redeem, not the query string

Anyone can open your setup address with invented parameters. The redeem is the proof:

- A reference works **once**, for **ten minutes**, and only for the integration it was made for.
- If the administrator starts a new connection, the earlier reference stops working.
- Every refused reference gets the same answer: `400` with `INTEGRATIONS_CONNECTION_REFERENCE_INVALID`. The answer does not say whether the reference was unknown, expired, used or replaced. A refused redeem does not use the reference up.

Act only on the `configurationId` the redeem returns. Do not act on `installation_id` from the query string. It is there for connectors from Hydda, which need it to request their token.

### Redirect only to the admin console

Before you redirect to `return_url`, check that its host is the admin console of the environment you are connected to: `admin.hydda.one` in production, `admin.dev.hydda.one` in development. Show an error for any other host.

### Report before you redirect

An administrator who returns before you report sees the configuration as **Pending**. Report `ready` or `failed` first, then redirect.

### Keep the reference out of your logs

Until it is redeemed, the reference is a credential. Do not log the full setup address, and redeem the reference on your server, not in the browser.

## Next

**[Integrations API guide](/guides/surfaces/integrations)**

The configuration fields, statuses, limits and errors.

**[Build your own integration](/guides/integrations/build-your-own)**

The steps that come before this one.
