Google

Internet-related services and products

Go to site
Explore
/
Apps
/
Google

Google API Integrations

Build and run workflows using the Google API. Use 1000s of source-available triggers and actions across 1000+ apps. Or write custom code to integrate any app or API in seconds.

Overview

Some things you can build using the Google API include:

  • A web application that retrieves data from the Google API and displays it to the user
  • A mobile application that uses the Google API to provide location-based services
  • A desktop application that accesses the Google API to perform searches and other tasks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { axios } from "@pipedream/platform"
export default defineComponent({
  props: {
    google: {
      type: "app",
      app: "google",
    }
  },
  async run({steps, $}) {
    return await axios($, {
      url: `https://www.googleapis.com/oauth2/v1/userinfo`,
      headers: {
        Authorization: `Bearer ${this.google.$auth.oauth_access_token}`,
      },
    })
  },
})

Authentication

Google uses OAuth authentication. When you connect your Google account, Pipedream will open a popup window where you can sign into Google and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Google API.

Pipedream requests the following authorization scopes when you connect your account:

emailprofilehttps://www.googleapis.com/auth/drivehttps://www.googleapis.com/auth/spreadsheetshttps://www.googleapis.com/auth/spreadsheets.readonlyhttps://www.googleapis.com/auth/drive.readonly
OAuth Request Configurations:
  1. authorization
    GEThttps://accounts.google.com/o/oauth2/auth?client_id={{oauth.client_id}}&state={{oauth.state}}&redirect_uri={{oauth.redirect_uri}}&response_type=code&scope={{oauth.space_separated_scopes}}&access_type=offline&prompt=consent
  2. accessToken
    POSThttps://oauth2.googleapis.com/tokencontent-type: application/x-www-form-urlencodedaccept: application/json
    client_id={{oauth.client_id}}&client_secret={{oauth.client_secret}}&grant_type=authorization_code&code={{oauth.code}}&redirect_uri={{oauth.redirect_uri}}
  3. refreshToken
    POSThttps://oauth2.googleapis.com/tokencontent-type: application/x-www-form-urlencodedaccept: application/json
    client_id={{oauth.client_id}}&client_secret={{oauth.client_secret}}&grant_type=refresh_token&refresh_token={{oauth.refresh_token}}