> 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/connectors-and-instances/patchworks-connectors/adobe-commerce-magento-prebuilt-connector.md).

# Adobe Commerce - Magento (prebuilt connector)

## Description

**Adobe Commerce** (formerly Magento) is a flexible, scalable commerce platform that lets you create uniquely personalised B2B and B2C experiences.

## API documentation

API documentation for Adobe Commerce (used to build this connector) can be found via the link below:

{% embed url="<https://devdocs.magento.com/redoc/2.3/>" %}

## Authentication

When adding connector instances for **Adobe Commerce**, the following authentication methods are supported:

* [Token authentication](#token-authentication)

### Token authentication

{% tabs %}
{% tab title="Required credentials" %}
When a user chooses to [add a connector instance](/product-documentation/connectors-and-instances/working-with-instances/adding-an-instance.md) using **token** authentication, the credentials below are prompted:

<table><thead><tr><th width="193">Credential</th><th data-type="checkbox">Required?</th><th>Notes</th></tr></thead><tbody><tr><td><code>URL</code></td><td>true</td><td>Displayed immediately after creating a new integration in the Magento admin console.</td></tr><tr><td><code>token</code></td><td>true</td><td>Displayed immediately after creating a new integration in the Magento admin console.</td></tr></tbody></table>
{% endtab %}

{% tab title="Obtaining credentials" %}

#### 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:

![](https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2Fl01x6D4dvnR1EoWhxBTd%2Fimage.png?alt=media\&token=33945f91-1f41-4cc8-849e-336176786cda)

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

![](https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FSZDOgQAdPEWqdYRfsZEp%2Fimage.png?alt=media\&token=dd84e2eb-1dbb-4f4e-abe1-3fb99ba3b10c)

**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':

![](https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FawDUaqrly2p6u2C2lGvZ%2Fimage.png?alt=media\&token=8004c06a-765f-4345-8956-f35632cfec12)

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

![](https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FAHcPRvJuI6blJcooYYRc%2Fimage.png?alt=media\&token=e3107328-640d-479d-ac47-a2c1020d90c0)

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

![](https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FfND8ymfX5cy7DG1GL8bH%2Fimage.png?alt=media\&token=52b982f3-26eb-4a66-a8c8-8cd0b26fd98b)

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

![](https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2F2RFKDF0glZESWCjXVGxF%2Fimage.png?alt=media\&token=744ccc4d-8b4b-4e7c-a53b-c8250ff8a0b5)

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

![](https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2Fec725xY5KeEFj3xXoxaP%2Fimage.png?alt=media\&token=6e7cccb0-5bbb-4165-910f-c3c9f65f80ff)

{% hint style="info" %}
The **access token** is required for Patchworks, but it's worth logging all token information returned here.
{% 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/
```

{% endtab %}

{% tab title="Additional setup" %}

#### Tokens

If you are using Magento 2.4.4 or later, the **allow OAuth access tokens to be used as standalone bearer tokens** option must be set to **yes**. To do this, follow the steps below.

#### The steps

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

**Step2**\
Select **stores** from the navigation menu:.

**Step 3**\
Select the **configuration** option:\
![](https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FFpO1jMGL5e3G9O4Ol9g2%2Foauth%20settings%202.png?alt=media\&token=3f44a0d7-49e3-44b9-b601-e1eaff246159)

**Step 4**\
Expand the **services** navigation option and select **OAuth**:

![](https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2F46iO6n2eQw6lMw1rp0K8%2Foauth%20settings%203.png?alt=media\&token=22b1bd65-d22b-405a-8717-b7d98ad52e78)

**Step 5**\
Set the **Allow OAuth Access Tokens to be used as standalone Bearer tokens** option to **yes**:

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FPdUbZ0cKuRzYcCYvsf3U%2Fconsumer%20settings.png?alt=media&amp;token=2a4b0c5d-6171-40a6-9cc4-a87ab6d726c5" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}
