0

I'm trying to send a notification out using Google Chats. But I have a few problems with the documentation I've been able to find:

  • It requires me to have a paid service account, which I do not have, and will not be getting
  • It requires using a chat bot, which (in my understanding) needs to be added to a room, and cannot just send out messages
  • Chat bots can't send out messages directly to personal accounts?

I'm already using Google OAuth2 authentication to access another Google API, so I'd like to use a Google API to send messages directly from the authenticated account. How would I do that?

So far:

  • All the documentation I can find is about making a chat bot.

  • I've considered some alternatives to sending out messages, but due to corporate device restrictions that will not be changing, google chats is my best option.

1 Answers1

0

At the moment what you're trying to do is not possible, for multiple reasons.

You may know this already, but Google Chat is an upgrade to their old "Classic Hangouts" chat. In Google's own words, this is focused on enterprise (i.e. paid) accounts. While personal accounts are also able to upgrade and get some of the benefits, their documentation shows that Google Chat for personal accounts is very similar to the old Hangouts and most of the new features are meant for the paid accounts. This also includes the use of bots.

As you've observed, the Chat API currently only has methods to create and manage bots. There are no methods to send messages as your own account. This could be to prevent spam or because their Chat API is relatively new, since the Classic Hangouts did not have an API, and Chat hasn't fully replaced it yet. Even then, given that Chat is "enterprise-focused", it is uncertain whether or not personal accounts would get access to any new API features.

You could try to post feedback on their issue tracker or request the feature to see if you get a response, but for an immediate solution you may want to just use the Gmail API to send a regular email or reconsider the other alternatives that you had in mind.

Daniel
  • 3,157
  • 2
  • 7
  • 15