Method: spaces.messages.get

  • Returns detailed information about a specific message within a space.

  • Requires providing the message's resource name using the format spaces/{space}/messages/{message} .

  • Supports both app and user authentication methods for accessing message details.

  • The response includes a Message object containing the message data if the request is successful.

  • Requires specific authorization scopes like chat.bot , chat.messages , or chat.messages.readonly .

Returns details about a message. For an example, see Get details about a message .

Supports the following types of authentication :

  • App authentication with one of the following authorization scopes:

    • https://www.googleapis.com/auth/chat.bot : When using this authorization scope, this method returns details about a message the Chat app has access to, like direct messages and slash commands that invoke the Chat app.
    • https://www.googleapis.com/auth/chat.app.messages.readonly with administrator approval (available in Developer Preview ). When using this authentication scope, this method returns details about a public message in a space.
  • User authentication with one of the following authorization scopes:

    • https://www.googleapis.com/auth/chat.messages.readonly
    • https://www.googleapis.com/auth/chat.messages

Note: Might return a message from a blocked member or space.

HTTP request

GET https://chat.googleapis.com/v1/{name=spaces/*/messages/*}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. Resource name of the message.

Format: spaces/{space}/messages/{message}

If you've set a custom ID for your message, you can use the value from the clientAssignedMessageId field for {message} . For details, see Name a message .

Request body

The request body must be empty.

Response body

If successful, the response body contains an instance of Message .

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/chat.bot
  • https://www.googleapis.com/auth/chat.messages
  • https://www.googleapis.com/auth/chat.messages.readonly
  • https://www.googleapis.com/auth/chat.app.messages.readonly

For more information, see the Authorization guide .

Design a Mobile Site
View Site in Mobile | Classic
Share by: