> For the complete documentation index, see [llms.txt](https://doc.wearepatchworks.com/product-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.wearepatchworks.com/product-documentation/patchworks-services/service-systems/supported-service-systems/magento-2-service-connector/finding-service-connector-credentials-for-magento-2.md).

# Finding service connector credentials for Magento 2

## Required credentials

To [add a Patchworks connector](/product-documentation/patchworks-services/service-connectors/adding-a-service-connector.md) for **Magento 2**, the following details are required for authentication:

<table><thead><tr><th>Credential</th><th data-type="checkbox">Required</th><th>Note</th></tr></thead><tbody><tr><td><a href="#token">Token</a></td><td>true</td><td>Displayed immediately after <a href="#token">creating a new integration in the Magento admin console</a>.</td></tr><tr><td><a href="#url">URL</a></td><td>true</td><td>The first part of <a href="#url">the URL that you use to access the Magento admin console</a>.</td></tr></tbody></table>

## Obtaining credentials

The credentials listed above are needed so that Patchworks can access the required data in **Magento 2**. To obtain these details, follow the steps below.

### Token

To obtain the token (actually an **access token**) required for Patchworks to access your **Magento 2** data, you must create an **integration**. To do this, follow the steps below.

**Step 1**\
Log into your **Magento admin console**.

**Step2** \
Click on the **system** button with a cog icon to open the menu:

![](/files/urWBWHPIF6YOWZJg2P3N)

**Step 3**\
Click on **integrations** under the **extensions** header. This will load the following page:&#x20;

![](/files/cPp6cbHJdzQluSE21eeb)

**Step 4**\
Click on **add new integration** to start adding a new integration.

**Step 5**\
Provide the required information in the first form. We suggest setting the name as 'Patchworks':

![](/files/NKmu9hE2DxF8f6vp4aid)

**Step 6**\
Click **API** under **basic settings** and assign the required permissions:

![](/files/apMUSuudoHqxKo6UPurP)

**Step 7**\
Click **save**. You will then be taken to the below page:

&#x20;![](/files/xjuoTxBW6pqcgAC24hzs)

**Step 8**\
Click **activate** for the integration you just saved and when prompted, confirm that the permissions are correct:

![](/files/DfOxZ96SqcJr2TihwJnb)

**Step 9**\
Click **allow** to display integration tokens - add them all to your password manager, ready for use in your Patchworks setup:

![](/files/2Y8kdv0N2ob9taiBxwVV)

{% hint style="info" %}
The **access token** is required for Patchworks, but it's worth logging all token information returned here. &#x20;
{% endhint %}

### URL

To find the URL required to add a Patchworks connector, log into your **Magento 2** **admin console** and check the URL in your browser's address bar. You need everything up to and including 'magento.com' - for example:

```
https://www.acme-magento.com/
```


---

# 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://doc.wearepatchworks.com/product-documentation/patchworks-services/service-systems/supported-service-systems/magento-2-service-connector/finding-service-connector-credentials-for-magento-2.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.
