How to retrieve a list of spaces for a Google Chat user (not the bot)

372 Views Asked by At

I am trying to derive a list of spaces that an authenticated user belongs to in Google Chat. I suspect the scope .../auth/chat.spaces.readonly is the right permission to achieve this. At the moment, I cant find any examples on how to retrieve the spaces for a user.

The only examples I have found has to do with retrieving the list of spaces for a bot with chat.spaces.list().

1

There are 1 best solutions below

2
Shweta Kapoor On

To use this you need to use service account authentication, read documentation here and here is an example to follow for service account authentication