---
title: "How to set up OAuth for existing Magento 2 integrations"
description: "This guide will cover how to update an existing Magento 2 integration from API credential authentication to the new OAuth workflow. Visit the guide here if you need to enable your Magento 2 integration for the first time. If you are using Magento 2 version 2.2.0 or older, follow this guide to manually enable OAuth."
canonical_url: "https://help.klaviyo.com/hc/en-us/articles/1260807540249"
markdown_url: "https://help.klaviyo.com/hc/en-us/articles/1260807540249.md"
locale: "en-us"
category: "Integrations"
section: "Magento 2"
updated: "2025-07-07"
---

# How to set up OAuth for existing Magento 2 integrations

## Overview

This guide will cover how to update an existing Magento 2 integration from API credential authentication to the new OAuth workflow. Visit the guide here if you need to [enable your Magento 2 integration](https://help.klaviyo.com/hc/en-us/articles/115005254348.md) for the first time. If you are using Magento 2 version 2.2.0 or older, follow this guide to [manually enable OAuth](https://help.klaviyo.com/hc/en-us/articles/4403350880411.md).

## Set up OAuth

Log in to your Magento 2 account. Here, we’ll enable OAuth to securely connect your Klaviyo account to the Magento 2 extension.

Navigate to **Stores > Configuration** from the admin dashboard. Click on **Klaviyo** and select the **Setup OAuth** tab. Give your integration a memorable name in the *Name* field, you will need to locate it by this name later. Click **Save Config** to proceed.

![OAUTHtab.png](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/43febae7f999918b764c73d3375b6a79fa32e513-1926x614.png?auto=format)

Next, locate **System** from the left hand navigation pane and select **Integrations** from the System tray. 

Locate the integration with the name you used above and click **Activate**.

![activateoauth.png](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/0742e1a5f6f5de9b7312177c2c9ff49996a513d1-1892x312.png?auto=format)

Activating the integration will open up a window requesting you to approve access to several permissions. Click **Allow** to accept the permissions and get redirected to Klaviyo to complete the integration setup.

![oauthperms.png](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/dfed353d025ccc34ae79aa263fd80a93b084a244-2518x842.png?auto=format)

Sign in if you have not already done so, or confirm your account name is correct and click **Integrate.** This will update the Magento 2 integration in the Klaviyo account shown. If you are logged into multiple Klaviyo accounts and the correct account is not displaying, log out of any other sessions.

![Image](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/9e556b43ab190092403ac9d6fa0262cbbbd45d67-1106x492.png?auto=format)

If the window closes automatically, the connection was successful. You can also confirm by opening your Klaviyo account in a new browser tab or window and selecting the **Integrations** tab. Find Magento 2 on the list of integrations - click on it, and you should see a screen like the one below:

![Image](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/003fabc952123e054337feebb15f7d7393325a83-810x1152.png?auto=format)

If you receive the following error instead, ensure that the API keys used in the first step correspond to the account you are currently logged in to.

![apierror.png](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/3a8c5fe6e74f9c85769e0732311851549af7fc97-1400x458.png?auto=format)

When establishing the connection between Magento and Klaviyo, if you receive a list of errors instead, you can click each error to learn more about the cause.


![oauthgenerror.png](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/c83829dcbc34ed3b6d90f4d8245da142cb7b5b71-1450x850.png?auto=format)
