akeneo / magento2-connector-community

Akeneo Connector for Magento 2
Open Software License 3.0
81 stars 89 forks source link

Parameter "client_id" is missing or does not match any client, or secret is invalid #392

Open nadeefit6 opened 3 years ago

nadeefit6 commented 3 years ago

Environment and configuration

  1. Magento 2.4.2 Community Edition

Steps to reproduce

  1. Test API Credentials in Magento Backend

Expected result

  1. Should be successfull

Actual result

  1. Parameter "client_id" is missing or does not match any client, or secret is invalid (see https://api.akeneo.com/php-client/exception.html#unprocessable-entity-exception)
walkwizus commented 2 years ago

Hi,

Same thing after upgrade. Any updates ?

walkwizus commented 2 years ago

In my case it's due to this commit: https://github.com/akeneo/magento2-connector-community/commit/d0f39624270268c3a4c7e3785135f9e00bdb575f#diff-89223417b0d8b4f3be81bd4caf5573ad94c01df7d6e897cb48352e7c6204af25

My credentials are stored in my env.php so I has added in my di.xml:

<type name="Magento\Config\Model\Config\TypePool">
        <arguments>
            <argument name="sensitive" xsi:type="array">
                <item name="akeneo_connector/akeneo_api/password" xsi:type="string">1</item>
                <item name="akeneo_connector/akeneo_api/client_secret" xsi:type="string">1</item>
            </argument>
        </arguments>
    </type>

Just need to re-save values with following command:

bin/magento config:set --lock-env akeneo_connector/akeneo_api/client_secret "DECRYPTED_VALUE" bin/magento config:set --lock-env akeneo_connector/akeneo_api/password "DECRYPTED_VALUE"

agghanim commented 1 year ago

I'm facing the same issue.

I tried above solution, it did not work for me. I tried the .htaccess method as described in the helpfiles (SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1) I removed and reinstalled the connector through composer, no fix I tried a new Akeneo setup (different IP, fresh installation), no fix I tried a new Magento setup (different IP, fresh installation), no fix

What is going on?

Extentsion version 103.3.1 Magento 2.4.3-p1 & Magento 2.4.5