The Google Calendar API gives developers access to Google Calendar data, allowing them to create their own applications that can read, write, and update calendar data. With the API, users can integrate their own calendar applications with Google Calendar, giving them the ability to manage their calendars in one place. The API also provides the ability to search for events and create new events.
Possible applications that could be built using the Google Calendar API include:
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
google_calendar: {
type: "app",
app: "google_calendar",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://www.googleapis.com/calendar/v3/calendars/primary`,
headers: {
Authorization: `Bearer ${this.google_calendar.$auth.oauth_access_token}`,
},
})
},
})
Create an event to the Google Calendar. See the docs here
Delete an event to the Google Calendar. See the docs here
Retrieve calendars from the user account. See the docs here
Retrieve a list of event from the Google Calendar. See the docs here
Google Calendar uses OAuth authentication. When you connect your Google Calendar account, Pipedream will open a popup window where you can sign into Google Calendar 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 Calendar API.
Pipedream requests the following authorization scopes when you connect your account:
email
profile
https://www.googleapis.com/auth/calendar.events
https://www.googleapis.com/auth/calendar.readonly
https://www.googleapis.com/auth/calendar.settings.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}}
&
prompt=consent
&
access_type=offline
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}}