Skip to content

Method: projects.messages.list

Lists the Messages of the specified project. List returns Messages sorted by create_time descending.

The caller must have messaging.messages.list permission on the project.

HTTP request


Path parameters

parent string
The resource name of the parent of which to list messages. Must be of the form projects/*.

Query parameters

pageSize number (int32 format)
The maximum number of Messages to return in the response. Default value is 10 and maximum value is 100.
pageToken string
A pagination token returned from a previous call to ListMessages that indicates where this listing should continue from.
filter string
Filter string to specify which results should be returned.

The following fields can be filtered: - createTime - to - from - status - direction - encoding

For example: createTime >= '2021-01-01T06:00:00.0Z' AND createTime < '2021-02-01' AND status = DELIVERED OR status = UNDELIVERED AND to = '+61' OR from = '+61'

Note that OR has higher precendence than AND.

Request body

The request body must be empty.

Response body

The ListMessages response message.

JSON representation
  "messages": [
      object (Message)
  "nextPageToken": string
messages[] object (Message)
A possibly paginated list of Messages that are direct descendants of the specified parent resource.
nextPageToken string
If this is set, it indicates there are additional results and contains the token to retrieve the next page of results. To use this, pass it in the page_token field when calling ListMessages.