akeneo / pim-community-dev

[Community Development Repository] The open source Product Information Management (PIM)
http://www.akeneo.com
Other
950 stars 513 forks source link

API connect with api-php-client not working, return error 422 #20403

Closed elrosi closed 4 months ago

elrosi commented 4 months ago

Hi, I have set up a new connection in the Connection Settings section. https://help.akeneo.com/v7-connect-your-pim/v7-manage-your-connections?from_search=140764575

In CREDENTIALS parameters are set: Client ID, Secret, Username, Password Role: Api Source, Group: Api: SAP Connection

After connecting via api-php-client client $clientBuilder->buildAuthenticatedByPassword() I get the response: the parameter "client_id" is missing or does not match any client, or the secret is invalid (see https://api.akeneo.com/php-client/exception.html#unprocessable-entity-exception)

array:2 [ "code" => 422 "message" => "The "client_id" parameter is missing or does not match any client, or the secret is invalid" ]

Would you be able to help me? I appreciate any help you can provide.

elrosi commented 4 months ago

The problem was a missing authorization header setting with Apache, on the VPS server. https://api.akeneo.com/documentation/troubleshooting.html