Method: spaces.messages.create

Stay organized with collections Save and categorize content based on your preferences.

Creates a message. Requires service account authentication.

HTTP request

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

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

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

Query parameters

Parameters
threadKey

string

Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a threadKey instead of thread.name. (Setting thread.name has no effect.)

The first message with a given threadKey starts a new thread. Subsequent messages with the same threadKey post into the same thread.

requestId

string

Optional. A unique request ID for this message. Specifying an existing request ID returns the message created with that ID instead of creating a new 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 one of the following OAuth scopes:

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

For more information, see the OAuth 2.0 Overview.