How to hide the comments button?

I encountered an issue while hiding the comment button.
If the edit in permissions is false and the comment is true, after hiding the comments button, I cannot use the Automation API to process the comment.Due to business requirements, I have to hide the comments buttons.All comment operations are processed through the Automation API. What should I do?
Due to business requirements, some files do not have editing permissions, but they must have comment permissions

Hello @dingnan

Please see the description of customization.comments parameter:
https://api.onlyoffice.com/docs/docs-api/usage-api/config/editor/customization/#comments

Generally speaking, it is expected that after disabling comments tab you can only view them. In such case you cannot hide comments tab and leave possibility to add comments.

If you have active or trial license, you can contact Support Team via Help Desk with this query.