Method: users.drafts.list
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
HTTP 요청
GET https://gmail.googleapis.com/gmail/v1/users/{userId}/drafts
URL은 gRPC 트랜스코딩 문법을 사용합니다.
경로 매개변수
매개변수 |
userId |
string
사용자의 이메일 주소 인증된 사용자를 나타내는 데 특수 값 me 을 사용할 수 있습니다.
|
쿼리 매개변수
매개변수 |
maxResults |
integer (uint32 format)
반환할 최대 답장 수입니다. 이 필드의 기본값은 100입니다. 이 필드의 최대 허용 값은 500입니다.
|
pageToken |
string
목록에서 특정 결과 페이지를 검색하는 페이지 토큰입니다.
|
q |
string
지정된 검색어와 일치하는 답장 메시지만 반환합니다. Gmail 검색창과 동일한 쿼리 형식을 지원합니다. 예를 들면 "from:someuser@example.com rfc822msgid:<somemsgid@example.com>
is:unread" 입니다.
|
includeSpamTrash |
boolean
결과에 SPAM 및 TRASH 의 초안을 포함합니다.
|
응답 본문
성공한 경우 응답 본문은 다음과 같은 구조의 데이터를 포함합니다.
JSON 표현 |
{
"drafts": [
{
object (Draft )
}
],
"nextPageToken": string,
"resultSizeEstimate": integer
} |
필드 |
drafts[] |
object (Draft )
초안 목록입니다. 각 Draft 리소스의 Message 속성에는 id 및 threadId 만 포함됩니다. messages.get 메서드는 추가 메시지 세부정보를 가져올 수 있습니다.
|
nextPageToken |
string
목록의 결과의 다음 페이지를 가져오기 위한 토큰입니다.
|
resultSizeEstimate |
integer (uint32 format)
예상 총 결과 수입니다.
|
승인 범위
다음 OAuth 범위 중 하나가 필요합니다.
https://mail.google.com/
https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/gmail.compose
https://www.googleapis.com/auth/gmail.readonly
자세한 내용은 승인 가이드를 참고하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[],[],null,["# Method: users.drafts.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListDraftsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nLists the drafts in the user's mailbox.\n\n### HTTP request\n\n`GET https://gmail.googleapis.com/gmail/v1/users/{userId}/drafts`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------------------------|\n| `userId` | `string` The user's email address. The special value `me` can be used to indicate the authenticated user. |\n\n### Query parameters\n\n| Parameters ||\n|--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `maxResults` | `integer (`[uint32](https://developers.google.com/discovery/v1/type-format)` format)` Maximum number of drafts to return. This field defaults to 100. The maximum allowed value for this field is 500. |\n| `pageToken` | `string` Page token to retrieve a specific page of results in the list. |\n| `q` | `string` Only return draft messages matching the specified query. Supports the same query format as the Gmail search box. For example, `\"from:someuser@example.com rfc822msgid:\u003csomemsgid@example.com\u003e is:unread\"`. |\n| `includeSpamTrash` | `boolean` Include drafts from `SPAM` and `TRASH` in the results. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"drafts\": [ { object (/workspace/gmail/api/reference/rest/v1/users.drafts#Draft) } ], \"nextPageToken\": string, \"resultSizeEstimate\": integer } ``` |\n\n| Fields ||\n|----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `drafts[]` | `object (`[Draft](/workspace/gmail/api/reference/rest/v1/users.drafts#Draft)`)` List of drafts. Note that the `Message` property in each `Draft` resource only contains an `id` and a `threadId`. The [`messages.get`](https://developers.google.com/workspace/gmail/api/v1/reference/users/messages/get) method can fetch additional message details. |\n| `nextPageToken` | `string` Token to retrieve the next page of results in the list. |\n| `resultSizeEstimate` | `integer (`[uint32](https://developers.google.com/discovery/v1/type-format)` format)` Estimated total number of results. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://mail.google.com/`\n- `\n https://www.googleapis.com/auth/gmail.modify`\n- `\n https://www.googleapis.com/auth/gmail.compose`\n- `\n https://www.googleapis.com/auth/gmail.readonly`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]