Sending a direct message from react without widget

Hi I am using a chatbot widget called chatroom from github and I want to send a default message based on cookies from the browser and that is not the welcome message we can set. Is there a way to send a message from React without entering the message in the browser.