Google Profile API

Operations related to Profile

OpenAPI Specification

google-profile-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Google Books About Profile API
  description: API for retrieving Bookshelf and Volume resources from Google Books
  version: 1.0.0
  contact:
    name: Google Books API
    url: https://developers.google.com/books
servers:
- url: https://www.googleapis.com/books/v1
  description: Google Books API v1
tags:
- name: Profile
  description: Operations related to Profile
paths:
  /gmail/v1/users/{userId}/profile:
    get:
      tags:
      - Profile
      summary: Google Get Profile
      description: The Google Gmail API's Get Profile operation retrieves the current user's Gmail profile information by making a GET request to the endpoint /gmail/v1/users/{userId}/profile, where {userId} can be either the user's email address or the special value "me" to indicate the authenticated user. This operation returns basic profile details including the user's email address, the total number of messages in their mailbox, the total number of threads, and their history ID, which is useful for tracking changes to the mailbox over time. The response provides essential metadata about the Gmail account without accessing the actual content of emails, making it a lightweight way to verify account details and obtain summary statistics. This endpoint requires appropriate OAuth 2.0 authorization scopes, typically gmail.readonly or gmail.metadata, to access the user's profile information securely.
      parameters:
      - name: Accept
        in: header
        schema:
          type: string
        example: application/json
      - name: userId
        in: path
        schema:
          type: string
        required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GmailUsersProfileGetResponse'
              examples:
                GmailUsersProfileGetResponseExample:
                  $ref: '#/components/examples/GmailUsersProfileGetResponseExample'
      x-api-evangelist-processing:
        ChooseTags: true
        WriteDescription: true
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: GmailUsersProfileGetResponseExample
components:
  schemas:
    GmailUsersProfileGetResponse:
      description: GmailUsersProfileGetResponse schema
      type: object
      properties:
        emailAddress:
          type: string
        messagesTotal:
          type: integer
        threadsTotal:
          type: integer
        historyId:
          type: string
  examples:
    GmailUsersProfileGetResponseExample:
      summary: Successful 200 response
      value:
        emailAddress: anim officia cillum
        messagesTotal: -17389993
        threadsTotal: -18322134
        historyId: velit deserunt commodo
  securitySchemes:
    OAuth2:
      type: oauth2
      description: OAuth 2.0 authentication for Google Books API
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/v2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            https://www.googleapis.com/auth/books: Manage your Google Books library