Method: spaces.messages.create

Creates a message.

HTTP request

POST https://chat.googleapis.com/v1/{parent=spaces/*}/messages

The URL uses Google API HTTP annotation syntax.

Path parameters

Parameters
parent

string

Required. Space resource name, in the form "spaces/*". Example: spaces/AAAAMpdlehY

Query parameters

Parameters
threadKey

string

Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves bots and webhooks from having to store the Hangouts Chat thread ID of a thread (created earlier by them) to post further updates to it.

Has no effect if thread field, corresponding to an existing thread, is set in message.

Request body

The request body contains an instance of Message.

Response body

If successful, the response body contains a newly created instance of Message.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/chat.bot

For more information, see the Auth Guide.

Enviar comentários sobre…

Precisa de ajuda? Acesse nossa página de suporte.