> For the complete documentation index, see [llms.txt](https://docs.swapkit.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.swapkit.dev/swapkit-widget/creating-your-widget-keys.md).

# Creating your widget keys

Before you can configure or embed the widget, you need a widget key. A widget key is a **Widget ID** + **Signing Secret** pair, created in the SwapKit dashboard and bound to the domain where the widget will run. Everything else (Widget Studio, the embed snippet, all settings) starts from this key, so this is the first step of any integration.

### Prerequisites

* A [SwapKit dashboard](https://dashboard.swapkit.dev) account with an app. You can register in our dashboard to access it.
* The domain (or domains) where the widget will be embedded.

### Add a domain

<figure><img src="/files/b2rmKpZgCIdXE5GXsmea" alt="" width="563"><figcaption><p>Key setup example</p></figcaption></figure>

1. Open your application in the [SwapKit dashboard](https://dashboard.swapkit.dev) and enter or create your app.
2. Open the **Widget Keys** tab.
3. Click **+ Add Domain**.
4. Enter the domain where the widget will be embedded, without `https://`. The widget will only work on that domain.
   * Use a wildcard prefix (e.g. `*.example.com`) to allow all subdomains. The base domain (`example.com`) is included automatically.&#x20;

<figure><img src="/files/hzlicdF5zGyINaawWVDV" alt="" width="563"><figcaption></figcaption></figure>

5. Confirm. The dashboard creates a **Widget ID** and **Widget Key** string scoped to that domain.&#x20;

> The **Signing Secret** is only shown when the key is created or rotated. Copy it somewhere safe at creation time. If you lose it, rotate the key to generate a new one.\
> Rotating invalidates the old secret immediately, so any live widget still using it will stop authenticating until you update your deployed integration with the new secret.

### Managing keys

<figure><img src="/files/v267fHqnOpkTT1svPCbH" alt="" width="563"><figcaption></figcaption></figure>

From the Widget Keys table you can:

* Copy the **Widget ID**.
* Open the key in **Widget Studio**.
* Enable or disable a key.
* Rotate the Widget Key string (open the dropdown when hovering the key).
* Delete a key.

Keep in mind:

* Rotating a Widget Key invalidates the old key immediately. Update your deployed snippet with the new key at the same time.
* Disabling or deleting a key stops the widget from authenticating on that domain.
* Keys are domain-bound. A key created for one domain will not authenticate on another, so create a separate domain entry (or use a wildcard) for each place the widget runs.

### Affiliate fees

As mentioned earlier, affiliate fees won't be charged until you set it up explicitly beforehand. Click on the Affiliate Config tab at the top of the dashboard and follow the steps on the [monetization page](/monetization.md).

<figure><img src="/files/7UYniIoORqvMpstogAdJ" alt=""><figcaption></figcaption></figure>

#### Next

With a key created and Studio open, continue to [Settings & Configuration](/swapkit-widget/configuring-in-code.md) to theme the widget, choose wallets, and generate your embed snippet, or start by [trying out the default integration](/swapkit-widget/integrating-swapkits-widget.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.swapkit.dev/swapkit-widget/creating-your-widget-keys.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
