> For the complete documentation index, see [llms.txt](https://coindisco.gitbook.io/coindisco/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://coindisco.gitbook.io/coindisco/widget-integration/embed-and-redirect.md).

# Redirect and iframe integration

## Hosted redirect

Use a normal link or application navigation to open the generated widget URL.

```html
<a
  href="https://widget.coindisco.com/?publicKey=pk_test_YOUR_PUBLIC_KEY"
  target="_blank"
  rel="noopener noreferrer"
>
  Buy or sell crypto
</a>
```

## Embedded iframe

```html
<iframe
  src="https://widget.coindisco.com/?publicKey=pk_test_YOUR_PUBLIC_KEY"
  title="Buy or sell crypto"
  width="450"
  height="700"
  allow="clipboard-write"
  style="border: 0; max-width: 100%;"
></iframe>
```

Use a responsive container in production:

```html
<div class="coindisco-widget">
  <iframe
    src="https://widget.coindisco.com/?publicKey=pk_test_YOUR_PUBLIC_KEY"
    title="Buy or sell crypto"
    allow="clipboard-write"
  ></iframe>
</div>

<style>
  .coindisco-widget {
    width: min(100%, 480px);
    height: 700px;
  }

  .coindisco-widget iframe {
    width: 100%;
    height: 100%;
    border: 0;
  }
</style>
```

## Security considerations

* Use the generated public widget key in browser code; never expose a private credential.
* Configure allowed origins in the dashboard.
* Use `noopener noreferrer` for new tabs.
* Do not append personal data to the URL unless the parameter is documented for that purpose.
* Validate wallet addresses in the partner application when the partner supplies them.
