All Downloads are FREE. Search and download functionalities are using the official Maven repository.

target.apidocs.com.google.api.services.chat.v1.HangoutsChat.Spaces.Messages.Create.html Maven / Gradle / Ivy

There is a newer version: v1-rev20241217-2.0.0
Show newest version






HangoutsChat.Spaces.Messages.Create (Google Chat API v1-rev20240829-2.0.0)












com.google.api.services.chat.v1

Class HangoutsChat.Spaces.Messages.Create

    • Constructor Detail

      • Create

        protected Create(String parent,
                         Message content)
        Creates a message in a Google Chat space. For an example, see [Send a message](https://developers.google.com/workspace/chat/create-messages). The `create()` method requires either user or app authentication. Chat attributes the message sender differently depending on the type of authentication that you use in your request. The following image shows how Chat attributes a message when you use app authentication. Chat displays the Chat app as the message sender. The content of the message can contain text (`text`), cards (`cardsV2`), and accessory widgets (`accessoryWidgets`). ![Message sent with app authentication](https://developers.google.com/workspace/chat/images/message-app-auth.svg) The following image shows how Chat attributes a message when you use user authentication. Chat displays the user as the message sender and attributes the Chat app to the message by displaying its name. The content of message can only contain text (`text`). ![Message sent with user authentication](https://developers.google.com/workspace/chat/images/message-user-auth.svg) The maximum message size, including the message contents, is 32,000 bytes. Create a request for the method "messages.create". This request holds the parameters needed by the the chat server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.

        HangoutsChat.initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest) must be called to initialize this instance immediately after invoking the constructor.

        Parameters:
        parent - Required. The resource name of the space in which to create a message. Format: `spaces/{space}`
        content - the Message
        Since:
        1.13

Copyright © 2011–2024 Google. All rights reserved.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy