Clearing private message chats via API

Description

Good day.
Please help, does the (/api/v1/rooms.cleanHistory) not work in RocketChat 7 for direct messages?

In version 6 we used it to clean up some people’s messages in direct chats. Is this not allowed now?

Now when I call it, I get an error:
{“success”:false,“error”:“User does not have access to the room [error-not-allowed]”

The permissions “clean-channel-history” are on.

Server Setup Information

  • Version of Rocket.Chat Server: 7.3.1
  • Operating System: ubuntu 20
  • Deployment Method: snap

Hmmm - not sure. I know they have tried to stop a lot of stuff with rooms in the name of ‘security’ but forget that some of us have responsibilities, and laws to follow.

Personally I think it is madness - it’s my server, I am responsible for the content and I should be able to do what I want.

I’m not sure exactly what/when - please check properly in the docs and let us know what you think is missing.

https://developer.rocket.chat/apidocs/deprecatedendpoints

This?

https://developer.rocket.chat/apidocs/clear-room-history

Thanks, I read the documentation, but none of the commands (chat.delete, rooms.cleanHistory) to clear direct chats work(

Don’t do this.

You duplicate work for me, and I don’t get paid to do this.