error: API call failed: The signatire is invalid. Verify and try again.
zaironjacobs opened this issue · comments
When I run node cli.js products
or any other such command in mage2vuestorefront/src , I receive the following error: API call failed: The signatire is invalid. Verify and try again.
This seems to be a different problem than issue#26.
I had to comment this piece of code in magento2/vendor/magento/framework/Oauth/Oauth.php just to be able to retrieve the products from Magento2:
if (!Security::compareStrings($calculatedSign, $params['oauth_signature'])) { throw new Exception(new Phrase('The signatire is invalid. Verify and try again.' )); }
It is unclear to me where the issue resides. I have checked my config.js file in mage2vuestorefront many times, the OAuth1 integration details for Magento seem to be filled in correctly, for example:
magento: { url: process.env.MAGENTO_URL || 'http://localhost:80/rest', consumerKey: 'r1yc5xuuep8r4asckm0zdqdwmv9hseic', consumerSecret: 'uc83htqfl8q7uvq8qwjo67pfghvm8il2', accessToken: 'tv7ofymmis8lsy9ya6m4x8vnkyy9plbb', accessTokenSecret: 'swhixp1lglex42ep70cnxhai3ouo0l3j'}
The thing is that when I try with Postman I can retrieve products using the same correct OAuth1 integration details I copied from Magento2, any help as to what the problem could be or what I may be doing wrong would be appreciated, thanks.
@zaijacobs did you fix this?
@zaijacobs did you fix this?
Yes, I believe the issue had to do with permissions for the Magento 2 installation I had.