Method: users.messages.insert
IMAP APPEND
과(와) 유사한 이 사용자의 편지함에만 메일을 직접 삽입하여 대부분의 검사 및 분류를 우회합니다. 메시지를 보내지 않습니다.
HTTP 요청
- 미디어 업로드 요청의 업로드 URI:
POST https://gmail.googleapis.com/upload/gmail/v1/users/{userId}/messages
- 메타데이터 전용 요청용 메타데이터 URI:
POST https://gmail.googleapis.com/gmail/v1/users/{userId}/messages
URL은 gRPC 트랜스코딩 구문을 사용합니다.
경로 매개변수
매개변수 |
userId |
string
사용자의 이메일 주소 특수 값 me 를 사용하여 인증된 사용자를 나타낼 수 있습니다.
|
쿼리 매개변수
매개변수 |
internalDateSource |
enum (InternalDateSource )
Gmail의 메일 내부 날짜 소스입니다.
|
deleted |
boolean
이메일을 TRASH가 아닌 영구 삭제된 것으로 표시하고 Vault 관리자에게 Google Vault에만 표시합니다. Google Workspace 계정에만 사용됩니다.
|
요청 본문
요청 본문에는 Message
의 인스턴스가 포함됩니다.
응답 본문
성공한 경우 응답 본문에 Message
의 인스턴스가 포함됩니다.
승인 범위
다음 OAuth 범위 중 하나가 필요합니다.
https://mail.google.com/
https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/gmail.insert
자세한 내용은 승인 가이드를 참고하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-09-05(UTC)
[null,null,["최종 업데이트: 2024-09-05(UTC)"],[[["Directly inserts a message into the user's mailbox, similar to `IMAP APPEND`, bypassing most scanning and classification."],["Supports two types of requests: uploading media content (`POST /upload/...`) and sending metadata only (`POST /...`)."],["Requires providing the user's email address (`userId`) as a path parameter and offers optional query parameters to control internal date source and deletion behavior."],["The request and response bodies both utilize the `Message` resource for structuring email data."],["To authorize, you'll need one of the specified OAuth scopes related to Gmail access and modification."]]],["This content outlines the process for directly inserting a message into a user's Gmail mailbox. Key actions include using `POST` requests to either an upload URI (`/upload/gmail/v1/users/{userId}/messages`) or a metadata URI (`/gmail/v1/users/{userId}/messages`). The `userId` path parameter identifies the user, and query parameters like `internalDateSource` and `deleted` provide further message properties. A `Message` instance is sent in the request and returned in the response. Authentication requires specific OAuth scopes.\n"]]