This repository was archived by the owner on Oct 8, 2025. It is now read-only.

Description
When I try to retrieve data with A GET request (ex: /shop-api/products/by-code/abc), I'm getting this response from the API :
{
"code": 401,
"message": "Invalid credentials."
}
Here's my configuration in config/packages/_sylius_shop_api.yaml :
imports:
- { resource: "@SyliusShopApiPlugin/Resources/config/app/config.yml" }
- { resource: "@SyliusShopApiPlugin/Resources/config/app/sylius_mailer.yml" }
# config/packages/fos_rest.yaml
fos_rest:
view:
formats:
json: true
format_listener:
rules:
- { path: '^/shop-api', priorities: ['json', 'xml'], fallback_format: json, prefer_extension: true }
- { path: '^/api', priorities: ['json', 'xml'], fallback_format: json, prefer_extension: true }
- { path: '^/', stop: true }
As you can see, the file is as described in the README of the package.
I tried everything I saw on Stackoverflow (related to api_platform) and none of those solutions worked.