How to set up OAuth for existing Magento 2 integrations
Estimated 2 minute read
|
Updated Jul 7, 2025, 12:00 AM EST
Table of contents
Overview
This guide will cover how to update an existing Magento 2 integration from API credential authentication to OAuth authentication. 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.
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.


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.


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.


Sign in to Klaviyo if prompted. Then confirm that the account shown is the existing Klaviyo account you want to update 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.


If the window closes automatically after you click Integrate, the connection was successful. You can also confirm by opening your Klaviyo account in a new browser tab or window and selecting Integrations from the left-hand navigation. Open Magento 2, then select Settings. Under Connection details, Site URL appears without the Username and Password fields once OAuth is set up.


If you receive the error “Klaviyo account does not match company ID,” check that the API keys configured in the Klaviyo extension in Magento belong to the Klaviyo account you are signed in to. This error can also appear if the authorization attempt expires. If the keys match, start a new OAuth authorization attempt in Magento and complete the Klaviyo confirmation promptly.


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.


Was this article helpful?
YesNo
Use this form only for article feedback. Learn how to contact support.
Explore more from Klaviyo
Community
Connect with peers, partners, and Klaviyo experts to find inspiration, share insights, and get answers to all of your questions.
Partners
Hire a Klaviyo-certified expert to help you with a specific task, or for ongoing marketing management.
Support
Access support through your account.
Email support (free trial and paid accounts) Available 24/7
Chat/virtual assistance Availability varies by location and plan type
