/gmail/v1/users/{userId}/threads
GET
/gmail/v1/users/{userId}/threadsLists the threads in the user's mailbox.
Request
Path Params
userId
string
required
The user's email address. The special value me
can be used to indicate the authenticated user.
Query Params
includeSpamTrash
string
optional
Include threads from SPAM
and TRASH
in the results.
labelIds
array[string]
optional
Only return threads with labels that match all of the specified label IDs.
maxResults
integer
optional
Maximum number of threads to return. This field defaults to 100. The maximum allowed value for this field is 500.
pageToken
string
optional
Page token to retrieve a specific page of results in the list.
q
string
optional
Only return threads matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser@example.com rfc822msgid: is:unread"
. Parameter cannot be used when accessing the api using the gmail.metadata scope.
Request samples
Responses
Successful response(200)
Successful response
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
No schema defined
Example
Not configured
Last modified: a year ago