Sendmessage realtime api security


hello. I have a question about Rocket Chat’s sendmessage realtime api.
Looking at the api, it seems that I can send a message to another chat room if I know only the room id.
Is there a security element that can send messages only to the room to which it belongs with the above api?
The link below is the API in use.

Server Setup Information

  • Version of Rocket.Chat Server: 4.0.2