Quoting this answer: https://community.klaviyo.com/integrations-39/magento-2-4-1-integration-issue-2147?postid=7443#post7443
I have a question to "how to solve that?"
Because I am also facing a similar issue while integrating.
==ERROR MESSAGE==
We ran into an error
There was an error while integrating your Klaviyo account with Magento 2. Below are the details about your error
Klaviyo is unable to connect to Magento Server for OAuth Handshake.
Url tried was: None
Please ensure that both /oauth/token/request and /oauth/token/access
are accessible
So if you can help me, it will be very much useful.
2
Answers
Actually there was no issues in the code or the module. The problem was, I was using magento in localhost, so klaviyo was not able to connect it. I moved to a public IP and removed the sub folder format in url, i.e., localhost/magento2 was my url. Changed it to work with localhost/
So now klaviyo is working.
Getting same above issue on Magento 2.4.2 with Klaviyo Integration.
Solution:
Please override this file to local
https://github.com/magento/magento2/commit/68d20230ca9d6198fa3093eb174e24aff47b1646#comments