With the Google Workspace Admin API, you can build tools to help manage your Google Workspace account. For example, you can:
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
google_workspace: {
type: "app",
app: "google_workspace",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://www.googleapis.com/oauth2/v1/userinfo`,
headers: {
Authorization: `Bearer ${this.google_workspace.$auth.oauth_access_token}`,
},
})
},
})
Emit new admin activities by selected user
Emit new admin activities by selected user
Emit new admin activities by selected user and application name
Retrieves a report of all Admin console activities done by a specific administrator. See the docs for more information
Retrieves a report of all activities for a specific event name. See the docs for more information
Retrieves a report of all activities for a specific event name and admin. See the docs for more information
Retrieves a report of all administrative activities done for an account. See the docs for more information
Google Workspace Admin uses OAuth authentication. When you connect your Google Workspace Admin account, Pipedream will open a popup window where you can sign into Google Workspace Admin 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 Workspace Admin API.
Pipedream requests the following authorization scopes when you connect your account:
email
profile
https://www.googleapis.com/auth/admin.directory.user.security
https://apps-apis.google.com/a/feeds/alias/
https://www.googleapis.com/auth/admin.directory.user
https://www.googleapis.com/auth/admin.directory.user.alias
https://www.googleapis.com/auth/cloud-platform
https://www.googleapis.com/auth/admin.directory.device.chromeos
https://www.googleapis.com/auth/admin.directory.customer
https://www.googleapis.com/auth/admin.directory.domain
https://www.googleapis.com/auth/admin.directory.domain.readonly
https://apps-apis.google.com/a/feeds/groups/
https://www.googleapis.com/auth/admin.directory.group
https://www.googleapis.com/auth/admin.directory.group.member
https://www.googleapis.com/auth/admin.directory.device.mobile
https://www.googleapis.com/auth/admin.directory.device.mobile.action
https://apps-apis.google.com/a/feeds/policies/
https://www.googleapis.com/auth/admin.directory.orgunit
https://www.googleapis.com/auth/admin.directory.orgunit.readonly
https://www.googleapis.com/auth/admin.directory.rolemanagement
https://apps-apis.google.com/a/feeds/calendar/resource/
https://www.googleapis.com/auth/admin.directory.resource.calendar
https://www.googleapis.com/auth/admin.directory.userschema
https://www.googleapis.com/auth/admin.reports.audit.readonly
GET
https://accounts.google.com/o/oauth2/auth
?
client_id={{oauth.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
state={{oauth.state}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
&
access_type=offline
&
prompt=consent
POST
https://oauth2.googleapis.com/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
redirect_uri={{oauth.redirect_uri}}
&
grant_type=authorization_code
&
code={{oauth.code}}
POST
https://oauth2.googleapis.com/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
grant_type=refresh_token
&
refresh_token={{oauth.refresh_token}}