Method: users.getProfile

現在のユーザーの Gmail プロフィールを取得します。

HTTP リクエスト

GET https://gmail.googleapis.com/gmail/v1/users/{userId}/profile

この URL は gRPC Transcoding 構文を使用します。

パスパラメータ

パラメータ
userId

string

ユーザーのメールアドレス。特別な値 me を使用すると、認証済みユーザーを示すことができます。

リクエスト本文

リクエストの本文は空にする必要があります。

レスポンスの本文

Gmail ユーザーのプロフィール。

成功すると、レスポンスの本文に次の構造のデータが含まれます。

JSON 表現
{
  "emailAddress": string,
  "messagesTotal": integer,
  "threadsTotal": integer,
  "historyId": string
}
フィールド
emailAddress

string

ユーザーのメール アドレスです。

messagesTotal

integer

メールボックス内のメールの合計数。

threadsTotal

integer

メールボックス内のスレッドの合計数。

historyId

string

メールボックスの現在の履歴レコードの ID。

認可スコープ

次の 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
  • https://www.googleapis.com/auth/gmail.metadata

詳細については、承認ガイドをご覧ください。