Showing results for 
Search instead for 
Did you mean: 

How to disable api methods?

How to disable api methods?



I want to disable some magento 2 api methods for security reasons.


Is there an option how I can disable them?


Re: How to disable api methods?

Hello mc388,


I did not find any way to find to disable completely. But there is a way to restrict access. WebapiSecurity enables access management of some Web API resources. If checkbox is enabled in backend through: Stores -> Configuration -> Services -> Magento Web API -> Web Api Security then the security of all of the services outlined in app/code/Magento/WebapiSecurity/etc/di.xml would be loosened. You may modify this list to customize which services should follow this behavior. By loosening the security, these services would allow access anonymously (by anyone).