Reputation: 705
I'm trying to create Google Hangouts Chat message with a link to new Video meeting.
So far I managed to send a regular message, but I cannot find how to create a video meeting and send a link there:
msg := chat.Message {
Text: "test msg",
}
_, err := chatService.Spaces.Messages.Create(spaceID, &msg).Do()
if err != nil {
log.Fatal(err)
}
In the chat itself it's easily doable:
Any help will be appreciated! Thanks!
Upvotes: 0
Views: 1923
Reputation: 19309
You have several options:
If you include a plain link URL in your message text, such as http://example.com/foo, Hangouts Chat uses this as the link text and automatically hyperlinks that text to the specified URL.
If you don't want the link URL to show up, you can provide an alternate link text for this link, using the following syntax:
<video-meeting-url|your link text>
Before doing this, you have to create a video meeting and get its link. You cannot create a video meeting with Hangouts Chat API.
As you can see in the official documentation, Chat API can only be used to manage spaces (that is, chat rooms and direct messages), as well as its members and messages. Video meetings are not part of Hangouts Chat but of Hangouts Meet, and there is no open Hangouts Meet API.
Upvotes: 1