REST Resource: users.messages.attachments
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
리소스: MessagePartBody
JSON 표현 |
{
"attachmentId": string,
"size": integer,
"data": string
} |
필드 |
attachmentId |
string
있는 경우 별도의 messages.attachments.get 요청에서 검색할 수 있는 외부 첨부파일의 ID를 포함합니다. 이 필드가 없으면 메시지 부분 본문의 전체 콘텐츠가 데이터 필드에 포함됩니다.
|
size |
integer
메시지 부분 데이터의 바이트 수입니다 (인코딩 제외).
|
data |
string (bytes format)
MIME 메시지 부분의 본문 데이터를 base64url로 인코딩된 문자열로 나타냅니다. 메일 본문이 없거나 본문 데이터가 별도의 첨부파일로 전송되는 MIME 컨테이너 유형의 경우 비어 있을 수 있습니다. 본문 데이터가 별도의 첨부파일에 포함된 경우 첨부파일 ID가 표시됩니다. base64 인코딩 문자열입니다.
|
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[],[],null,["# REST Resource: users.messages.attachments\n\n- [Resource: MessagePartBody](#MessagePartBody)\n - [JSON representation](#MessagePartBody.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: MessagePartBody\n-------------------------\n\nThe body of a single MIME message part.\n\n| JSON representation |\n|---------------------------------------------------------------------|\n| ``` { \"attachmentId\": string, \"size\": integer, \"data\": string } ``` |\n\n| Fields ||\n|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `attachmentId` | `string` When present, contains the ID of an external attachment that can be retrieved in a separate `messages.attachments.get` request. When not present, the entire content of the message part body is contained in the data field. |\n| `size` | `integer` Number of bytes for the message part data (encoding notwithstanding). |\n| `data` | `string (`[bytes](https://developers.google.com/discovery/v1/type-format)` format)` The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment. A base64-encoded string. |\n\n| Methods ------- ||\n|----------------------------------------------------------------------------------|----------------------------------------|\n| ### [get](/workspace/gmail/api/reference/rest/v1/users.messages.attachments/get) | Gets the specified message attachment. |"]]