cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable api methods?

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

How to disable api methods?

Hi,

 

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

 

Is there an option how I can disable them?

1 REPLY 1

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).