3

I would like to integrate chat functionality in my PHP website with Google Chat API, I checked the link https://developers.google.com/hangouts/chat/reference/rest

Here, with these APIs, I want to create rooms between two users, sending messages to each other in a room, but I did not find the right way to do so. are there any preferable docs? (I reviewed official docs, seems not much useful)

Ronak Solanki
  • 341
  • 2
  • 5
  • 14
  • I agree, the badly documented API seems to favour only Python for setting up API access. Surely we should be given pure HTTP and JSON examples ? We can then use the REST api on multiple environments ? – Datadimension May 29 '23 at 23:27

1 Answers1

0

If you want to create rooms between users, I recommend you to take a look at spaces. They are the Chat API equivalent of a chatroom. In fact the resource rooms is a special subset of spaces. Then, if you want to create a space you only need to work with spaces.message.create(). Please keep in mind that Chat API is geared towards bots, and bots don't create chatrooms (they are invited by users to existing chatrooms). Feel free to comment on my answer if you have any doubts.

Jacques-Guzel Heron
  • 2,480
  • 1
  • 7
  • 16