In my rails application, I am trying to create and send a google chat message using the api method spaces.messages.create as explained in this documentation. To do that, I will have to authenticate with a service account. I cant find examples on how to do this with ruby in reference to google chat. It seems like I will have to use the ruby cloud sdk but I cant find any reference to google chat here . Instead of using the google cloud sdk, is it possible to do this with a ruby http client?
I will like to know how to authenticate using a service account and sending a message to google chat using the api method spaces.messages.create
I think the steps are as follows:
https://www.googleapis.com/auth/chat.botscope.googleauth.3- Use the
google-apis-chat_v1for performing the request.In any case, I strongly review the documentation for Google Chats API, for a full understanding on how the authorization flow works.
Updated
Sample ruby client send message