Magento – Restricting access to anonymous web APIs

magento2restSecuritywebapi

As given in the documentation here : http://devdocs.magento.com/guides/v2.0/rest/anonymous-api-security.html
By default magento 2 only restrict Catalog, Store and CMS API from anonymous users.

In a same way how I can restrict access for all the available API's in magento 2?

The reason is I am building an Mobile app and website based on Angular and I wanted that only my app and website should have access to all the API.

Best Answer

To disable Anonymous Guest Access Go to

Admin > Menu > Store > Configration > Services > Magento Web API > Web API Security

Allow Anonymous Guest Access set to No

If you Set Allow Anonymous Guest Access set to No, Magento Website will not function properly as some API is used by Magento Checkout Process. You have to disable Guest Checkout.

Check http://devdocs.magento.com/guides/v2.0/rest/anonymous-api-security.html