取得目前使用者的 Gmail 個人資料。
HTTP 要求
GET https://gmail.googleapis.com/gmail/v1/users/{userId}/profile
這個網址使用 gRPC 轉碼語法。
路徑參數
| 參數 | |
|---|---|
userId |
使用者的電子郵件地址。特殊值 |
要求主體
要求主體必須為空白。
回應主體
Gmail 使用者的個人資料。
如果成功,回應主體會含有以下結構的資料:
| JSON 表示法 |
|---|
{ "emailAddress": string, "messagesTotal": integer, "threadsTotal": integer, "historyId": string } |
| 欄位 | |
|---|---|
emailAddress |
使用者的電子郵件地址。 |
messagesTotal |
信箱中的郵件總數。 |
threadsTotal |
信箱中的主題總數。 |
historyId |
信箱目前記錄的歷史記錄 ID。 |
授權範圍
需要下列其中一種 OAuth 範圍:
https://mail.google.com/https://www.googleapis.com/auth/gmail.modifyhttps://www.googleapis.com/auth/gmail.composehttps://www.googleapis.com/auth/gmail.readonlyhttps://www.googleapis.com/auth/gmail.metadata
詳情請參閱授權指南。