Google OAuth2 API icon

Google OAuth2 API

Obtains end-user authorization grants for use with other Google APIs

COMMUNITYBEARER0 INSTALLS
API Docs
OpenAPI Specificationv3.0
{
  "openapi": "3.0.0",
  "servers": [
    {
      "url": "https://www.googleapis.com/"
    }
  ],
  "info": {
    "contact": {
      "name": "Google",
      "url": "https://google.com",
      "x-twitter": "youtube"
    },
    "description": "Obtains end-user authorization grants for use with other Google APIs.",
    "license": {
      "name": "Creative Commons Attribution 3.0",
      "url": "http://creativecommons.org/licenses/by/3.0/"
    },
    "termsOfService": "https://developers.google.com/terms/",
    "title": "Google OAuth2 API",
    "version": "v2",
    "x-apiClientRegistration": {
      "url": "https://console.developers.google.com"
    },
    "x-apisguru-categories": [
      "analytics",
      "media"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_www.google.com_images_branding_googlelogo_2x_googlelogo_color_272x92dp.png"
    },
    "x-origin": [
      {
        "converter": {
          "url": "https://github.com/mermade/oas-kit",
          "version": "7.0.4"
        },
        "format": "google",
        "url": "https://www.googleapis.com/discovery/v1/apis/oauth2/v2/rest",
        "version": "v1"
      }
    ],
    "x-preferred": true,
    "x-providerName": "googleapis.com",
    "x-serviceName": "oauth2"
  },
  "externalDocs": {
    "url": "https://developers.google.com/identity/protocols/oauth2/"
  },
  "tags": [
    {
      "name": "userinfo"
    }
  ],
  "paths": {
    "/oauth2/v2/tokeninfo": {
      "parameters": [
        {
          "$ref": "#/components/parameters/alt"
        },
        {
          "$ref": "#/components/parameters/fields"
        },
        {
          "$ref": "#/components/parameters/key"
        },
        {
          "$ref": "#/components/parameters/oauth_token"
        },
        {
          "$ref": "#/components/parameters/prettyPrint"
        },
        {
          "$ref": "#/components/parameters/quotaUser"
        },
        {
          "$ref": "#/components/parameters/userIp"
        }
      ],
      "post": {
        "operationId": "oauth2.tokeninfo",
        "parameters": [
          {
            "in": "query",
            "name": "access_token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "id_token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tokeninfo"
                }
              }
            },
            "description": "Successful response"
          }
        }
      }
    },
    "/oauth2/v2/userinfo": {
      "get": {
        "operationId": "oauth2.userinfo.get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Userinfo"
                }
              }
            },
            "description": "Successful response"
          }
        },
        "security": [
          {
            "Oauth2": [
              "openid"
            ],
            "Oauth2c": [
              "openid"
            ]
          },
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/userinfo.email"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/userinfo.email"
            ]
          },
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/userinfo.profile"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/userinfo.profile"
            ]
          }
        ],
        "tags": [
          "userinfo"
        ]
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/alt"
        },
        {
          "$ref": "#/components/parameters/fields"
        },
        {
          "$ref": "#/components/parameters/key"
        },
        {
          "$ref": "#/components/parameters/oauth_token"
        },
        {
          "$ref": "#/components/parameters/prettyPrint"
        },
        {
          "$ref": "#/components/parameters/quotaUser"
        },
        {
          "$ref": "#/components/parameters/userIp"
        }
      ]
    },
    "/userinfo/v2/me": {
      "get": {
        "operationId": "oauth2.userinfo.v2.me.get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Userinfo"
                }
              }
            },
            "description": "Successful response"
          }
        },
        "security": [
          {
            "Oauth2": [
              "openid"
            ],
            "Oauth2c": [
              "openid"
            ]
          },
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/userinfo.email"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/userinfo.email"
            ]
          },
          {
            "Oauth2": [
              "https://www.googleapis.com/auth/userinfo.profile"
            ],
            "Oauth2c": [
              "https://www.googleapis.com/auth/userinfo.profile"
            ]
          }
        ],
        "tags": [
          "userinfo"
        ]
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/alt"
        },
        {
          "$ref": "#/components/parameters/fields"
        },
        {
          "$ref": "#/components/parameters/key"
        },
        {
          "$ref": "#/components/parameters/oauth_token"
        },
        {
          "$ref": "#/components/parameters/prettyPrint"
        },
        {
          "$ref": "#/components/parameters/quotaUser"
        },
        {
          "$ref": "#/components/parameters/userIp"
        }
      ]
    }
  },
  "components": {
    "parameters": {
      "alt": {
        "description": "Data format for the response.",
        "in": "query",
        "name": "alt",
        "schema": {
          "enum": [
            "json"
          ],
          "type": "string"
        }
      },
      "fields": {
        "description": "Selector specifying which fields to include in a partial response.",
        "in": "query",
        "name": "fields",
        "schema": {
          "type": "string"
        }
      },
      "key": {
        "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
        "in": "query",
        "name": "key",
        "schema": {
          "type": "string"
        }
      },
      "oauth_token": {
        "description": "OAuth 2.0 token for the current user.",
        "in": "query",
        "name": "oauth_token",
        "schema": {
          "type": "string"
        }
      },
      "prettyPrint": {
        "description": "Returns response with indentations and line breaks.",
        "in": "query",
        "name": "prettyPrint",
        "schema": {
          "type": "boolean"
        }
      },
      "quotaUser": {
        "description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.",
        "in": "query",
        "name": "quotaUser",
        "schema": {
          "type": "string"
        }
      },
      "userIp": {
        "description": "Deprecated. Please use quotaUser instead.",
        "in": "query",
        "name": "userIp",
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "Tokeninfo": {
        "properties": {
          "audience": {
            "description": "Who is the intended audience for this token. In general the same as issued_to.",
            "type": "string"
          },
          "email": {
            "description": "The email address of the user. Present only if the email scope is present in the request.",
            "type": "string"
          },
          "expires_in": {
            "description": "The expiry time of the token, as number of seconds left until expiry.",
            "format": "int32",
            "type": "integer"
          },
          "issued_to": {
            "description": "To whom was the token issued to. In general the same as audience.",
            "type": "string"
          },
          "scope": {
            "description": "The space separated list of scopes granted to this token.",
            "type": "string"
          },
          "user_id": {
            "description": "The obfuscated user id.",
            "type": "string"
          },
          "verified_email": {
            "description": "Boolean flag which is true if the email address is verified. Present only if the email scope is present in the request.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "Userinfo": {
        "properties": {
          "email": {
            "description": "The user's email address.",
            "type": "string"
          },
          "family_name": {
            "description": "The user's last name.",
            "type": "string"
          },
          "gender": {
            "description": "The user's gender.",
            "type": "string"
          },
          "given_name": {
            "description": "The user's first name.",
            "type": "string"
          },
          "hd": {
            "description": "The hosted domain e.g. example.com if the user is Google apps user.",
            "type": "string"
          },
          "id": {
            "description": "The obfuscated ID of the user.",
            "type": "string"
          },
          "link": {
            "description": "URL of the profile page.",
            "type": "string"
          },
          "locale": {
            "description": "The user's preferred locale.",
            "type": "string"
          },
          "name": {
            "description": "The user's full name.",
            "type": "string"
          },
          "picture": {
            "description": "URL of the user's picture image.",
            "type": "string"
          },
          "verified_email": {
            "default": true,
            "description": "Boolean flag which is true if the email address is verified. Always verified because we only return the user's primary email address.",
            "type": "boolean"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "Oauth2": {
        "description": "Oauth 2.0 implicit authentication",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://accounts.google.com/o/oauth2/auth",
            "scopes": {
              "https://www.googleapis.com/auth/userinfo.email": "See your primary Google Account email address",
              "https://www.googleapis.com/auth/userinfo.profile": "See your personal info, including any personal info you've made publicly available",
              "openid": "Associate you with your personal info on Google"
            }
          }
        },
        "type": "oauth2"
      },
      "Oauth2c": {
        "description": "Oauth 2.0 authorizationCode authentication",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://accounts.google.com/o/oauth2/auth",
            "scopes": {
              "https://www.googleapis.com/auth/userinfo.email": "See your primary Google Account email address",
              "https://www.googleapis.com/auth/userinfo.profile": "See your personal info, including any personal info you've made publicly available",
              "openid": "Associate you with your personal info on Google"
            },
            "tokenUrl": "https://accounts.google.com/o/oauth2/token"
          }
        },
        "type": "oauth2"
      }
    }
  }
}