OAuth2 Authorization with Basic or API Key
Choose one or both of two methods:
- Basic Auth. If you use Basic auth, you can reuse existing user’s login & password directly. In Configuration -> API Settings, enable Basic authentication.
- API Credentials. If you use API Credentials, you will need to get access token first. enable the API in the Configuration -> API Settings. This will add the “API Credentials” to the admin menu.
You will need to clear cache. Otherwise you’ll get 404 not found error accessing /api endpoints.
sudo -H -u www-data bin/console cache:clear