Basically what the title says, I’m using Google Chat API to send messages to one space, which are marked as private. They are received, but the space is not listed in bolt font in the list of spaces nor is notification on mobile received. It’s only shown as a popup in Windows, not anywhere else. I have set the space to receive all notifications.Message in space Windows popup notification
I use the official google api python package. I build the chat api using service account token, then send a message like this. The sender is a google (app) chat bot, which is listed only for our company.
chat = build("chat", "v1", credentials=credentials)
body = {
"text": notification_text,
"privateMessageViewer": {
"name": f"users/{user.get('email')}",
},
}
message = (
chat.spaces()
.messages()
.create(parent=f"spaces/{space_id}", body=body)
.execute()
)
Marek Molisch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.