Chat API: can I send notifications to Gather?

Hello friends!

Is there a way to send Chat messages to gather using the API? Like notifications from outside apps that are important to my team?

Thanks in advance!

Hi there jumperstudio,

The answer is different depending on which type of space you are using. Gather has the Event spaces and the Remote Work spaces. The API that has the chat functionality only appears to work in the Event spaces as the Chat for the Remote Work spaces has been updated with some improvements and no longer supports the chat API. They shared this info on their slack channel around 6 months ago.

Here is the API documentation to the chat command, which is what you’ll need to send chat commands using the Websocket API. Game | @gathertown/gather-game-client

Here is a short example of sending a message to global chat:

game.chat("GLOBAL_CHAT", [], context.player!.map!, {
    contents: `Hi, here is a message.`
});