> For the complete documentation index, see [llms.txt](https://docs.adpage.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.adpage.io/integrations-websites/lightspeed/generate-lightspeed-api-keys-for-webhooks.md).

# Generate Lightspeed API Keys for webhooks

How do you generate the API Key and API Secret within Lightspeed to use webhooks.

To use AdPage's backend webhooks with Lightspeed, you'll need an API Key and API Secret from your Lightspeed back office. This guide walks you through creating them and connecting them to your server container.

### Check this first

The Lightspeed Webhooks API connection only works for:

* Single-store setups
* Dutch webshops (`.nl` domains)

It does **not** work for:

* Multistore configurations
* Webshops in countries other than the Netherlands
* International Lightspeed accounts

If your shop falls into the second group, the connection won't establish no matter how the key is configured, so it's worth confirming this before you start rather than after.

### Create the API key in Lightspeed

**1.** Log in to your Lightspeed eCom back office with an administrator account.

**2.** Click **Settings** in the main menu.

**3.** Under your webshop settings, go to **Developers** and open the **API** settings.

**4.** Click **Create new API key**.

**5.** Give the key a recognisable name, for example *AdPage Integration*. Your future self will thank you when there are four keys in the list.

**6.** Set the permissions:

| Access | Scopes                      |
| ------ | --------------------------- |
| Read   | Products, Orders, Customers |
| Write  | Orders                      |

**7.** Once created, Lightspeed shows you two values:

* **API Key** — a long string of letters and numbers
* **API Secret** — a long string of letters and numbers

{% hint style="info" %}
**Copy both immediately and store them somewhere safe.** The API Secret is shown only once. If you lose it, there's no way to retrieve it, you'll have to delete the key and create a new one.
{% endhint %}

<figure><img src="https://1274044937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA65KwL1NwewlJbtCXsXd%2Fuploads%2Fts2JAc5z6PpvOwj0lIjI%2Fimage.png?alt=media&amp;token=3d9410b7-b57b-409d-9e66-5bdf85f17953" alt=""><figcaption></figcaption></figure>

### Connect them to AdPage

**8.** Open your server container in the [AdPage platform](https://trytagging.com/auth/login).

**9.** Go to the **Pixel installation instructions**.

**10.** At the bottom of those instructions you'll find the **Lightspeed webhook settings**. Enter your API Key and API Secret there, then enable the functionality.

### Keeping the credentials safe

An API key with read access to your orders and customers is worth protecting properly:

* Store the credentials in a password manager rather than a document or a chat message.
* Never share them with anyone who doesn't need them, and revoke rather than reuse when someone leaves.
* Delete old or unused keys periodically, every key that exists is a key that can leak.
* Use descriptive names so you can tell at a glance what each key is for and whether it's still needed.

### If the connection doesn't work

Work through these in order:

* **Does the shop meet the requirements?** A Dutch single store is a hard condition, not a recommendation.
* **Is the key active** in the Lightspeed back office? Keys can be disabled there independently of AdPage.
* **Are the permissions right?** Missing read access on Orders is the most common cause of a connection that authenticates but returns nothing.
* **Did the secret paste cleanly?** A trailing space or a truncated copy looks identical to a wrong secret.

Then test the API connection from within AdPage to confirm.


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.adpage.io/integrations-websites/lightspeed/generate-lightspeed-api-keys-for-webhooks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
