Closed jeromeSH26 closed 3 years ago
Same problem here for me:
Simple code to reproduce:
const keyFile = process.env["GOOGLE_CHAT_KEYFILE"]
const chatClient = google.chat({
auth: new GoogleAuth({keyFile, scopes: ["https://www.googleapis.com/auth/chat.bot"]}),
version: "v1"
});
chatClient.spaces.list().then(response => console.log(response.data))
Key file obtained via instructions on https://developers.google.com/hangouts/chat/how-tos/service-accounts
Note that as per instructions I have not included any roles. this is on a fresh account with a single room in google chat.
I'm beginning to think this is an issue with the rest API itself, as I can reproduce this outside the SDK by using the generated token. I've reported the issue the Chat API team.
Thanks for reporting the issue to the Chat API team. Looks like we can close this.
Hi, I'm trying to list the spaces a user is member of. When querying, I got this error which I don't get the meaning. Using a service account that has the chat.bot scope available, and passing the user in the "subject" field when requesting the token. What is the issue then?