Method: users.drafts.get
Lấy bản nháp được chỉ định.
Yêu cầu HTTP
GET https://gmail.googleapis.com/gmail/v1/users/{userId}/drafts/{id}
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Các tham số |
userId |
string
Địa chỉ email của người dùng. Bạn có thể sử dụng giá trị đặc biệt me để cho biết người dùng đã xác thực.
|
id |
string
Mã của bản nháp cần truy xuất.
|
Tham số truy vấn
Các tham số |
format |
enum (Format )
Định dạng để trả về bản nháp.
|
Nội dung yêu cầu
Nội dung yêu cầu phải trống.
Nội dung phản hồi
Nếu thành công, nội dung phản hồi sẽ chứa một phiên bản của Draft
.
Phạm vi uỷ quyền
Yêu cầu một trong các phạm vi OAuth sau:
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
Để biết thêm thông tin, hãy xem Hướng dẫn uỷ quyền.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2024-09-05 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2024-09-05 UTC."],[[["Retrieves a specific email draft using the draft ID and user ID."],["Allows specifying the format of the returned draft using query parameters."],["Requires authorization with specific Gmail scopes like `mail.google.com` or `gmail.readonly`."],["Returns the draft details as a `Draft` object in the response body if successful."],["Uses gRPC Transcoding syntax for its URL structure."]]],["This API endpoint retrieves a specific draft from a user's Gmail account. It uses a `GET` request to the URL `https://gmail.googleapis.com/gmail/v1/users/{userId}/drafts/{id}`. Required path parameters include `userId` (user's email or \"me\") and `id` (draft ID). An optional query parameter, `format`, determines the draft's return format. The request body must be empty. The successful response returns a draft instance. Access requires specific OAuth scopes, such as `mail.google.com`.\n"]]