Reputation: 61
We are developing a Google Chat App and in particular scenario we need to post a Async card message with interactive components to the User.
We followed https://developers.google.com/chat/api/guides/v1/messages/create and https://developers.google.com/chat/api/guides/auth/service-accounts and a service account with the scope https://www.googleapis.com/auth/chat.bot.
We can able to post the Async card message using the Service Account for our workspace domain say for example myappdomain.com.
We saw in Google documents that the Service Accounts are not bound to a Domain.
Can we use the same Service Account Credentials to post the Async Card message to a user who is in another workspace say externaldomain.com ?
If not, do need to ask the Admin of externaldomain.com to create a Service Account with the needed scope and share the .json file to us ?
Upvotes: 0
Views: 208
Reputation: 8118
Can we use the same Service Account Credentials to post the Async Card message to a user who is in another workspace say externaldomain.com ?
If your application is published as a public app (learn more), and it's installed by externaldomain.com, you can send an asynchronous Card message to a user who is part of a different workspace, such as externaldomain.com.
If not do need to ask the Admin of externaldomain.com to create a Service Account with the needed scope and share the .json file to us ?
Google Chat apps with the "chatbot" scope are typically tied to a specific project. If the app is not publicly published, it's limited to use within the organization's workspace. Even if you utilize a Service Account from a different organization, sending chats to another organization is not possible.
My suggestion is to strongly consider publish your chat app to do that. Otherwise, you may find it necessary to create a separate app for each workspace organization.
Upvotes: 1