# Lightspeed

How to connect Lightspeed to Churned.io\
Log in to the Churned platform and go to the “Integrations” section. Click on “New Integration” and select Lightspeed from the list.

You will be prompted to enter the following credentials:

Required Credentials

1. clientId – The client ID from your Lightspeed developer account.
2. clientSecret – The secret associated with the client ID.
3. accessToken – The access token used to authenticate API requests.
4. accountId – The account ID associated with your Lightspeed store.

Register a Developer Application

1. Go to the Lightspeed Developer Portal.
2. Create or log in to your developer account.
3. Register a new application to receive your clientId and clientSecret.

Obtain Access Token

1. Use the client ID and secret to initiate an OAuth flow with Lightspeed.
2. Authorize your app and receive the accessToken.
3. You may need a developer to assist with this step if you’re unfamiliar with OAuth 2.0.

Find Account ID

1. After completing the OAuth flow, you will receive your accountId in the API response.
2. You can also retrieve it via the Lightspeed Retail API using the /account.json endpoint.

Input the Credentials\
Enter the retrieved credentials into the Churned integration form:

1. clientId: From your Lightspeed developer app.
2. clientSecret: Linked to the client ID.
3. accessToken: OAuth token received after authentication.
4. accountId: Your Lightspeed store account ID.

Click Save and test the connection to ensure everything is working correctly.

Once connected, notify the Churned team to synchronize data.

Helpful Links

* Lightspeed Retail API Documentation
* OAuth Setup Guide


---

# Agent Instructions: 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.churned.io/churned-docs/integrations/lightspeed.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.
