GPT Action + Google OAuth
Published: 2024-01-28 15:10:09

**GPT Action + Google OAuth **




Authorization URL
https://accounts.google.com/o/oauth2/v2/auth
Token URL
https://oauth2.googleapis.com/token
Scope
https://www.googleapis.com/auth/calendar.readonly

{
  "openapi": "3.1.0",
  "info": {
    "title": "GPT Google Calendar Integration",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://www.googleapis.com/calendar/v3"
    }
  ],
  "paths": {
    "/users/me/calendarList": {
      "get": {
        "summary": "List user's calendars",
        "operationId": "listUserCalendars",
        "responses": {
          "200": {
            "description": "A list of user's calendars",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "summary": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/calendars/{calendarId}/events": {
      "get": {
        "summary": "List events from a calendar",
        "operationId": "listCalendarEvents",
        "parameters": [
          {
            "name": "calendarId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of calendar events",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "start": {
                            "type": "object",
                            "properties": {
                              "dateTime": {
                                "type": "string"
                              }
                            }
                          },
                          "end": {
                            "type": "object",
                            "properties": {
                              "dateTime": {
                                "type": "string"
                              }
                            }
                          },
                          "summary": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {},
    "securitySchemes": {
      "OAuth2": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://accounts.google.com/o/oauth2/v2/auth",
            "tokenUrl": "https://oauth2.googleapis.com/token",
            "scopes": {
              "https://www.googleapis.com/auth/calendar": "Manage your calendars"
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "OAuth2": []
    }
  ]
}