🗓️Calendars
Google Calendars
Get All Calendars
GET
https://api.pyas.io/google/calendars
Gets all calendars that a user has access to.
Query Parameters
Name
Type
Description
accountId*
String
The user's Pyas account id. This is returned when you connect an account to Pyas.
Headers
Name
Type
Description
x-api-key*
String
API key
{
"success": true,
"data": {
"calendars": [
{
"kind": "calendar#calendarListEntry",
"etag": "\"000000000000000000000\"",
"id": "some-user@gmail.com",
"summary": "some-user@gmail.com",
"timeZone": "UTC",
"colorId": "14",
"backgroundColor": "#9fe1e7",
"foregroundColor": "#000000",
"selected": true,
"accessRole": "owner",
"defaultReminders": [
{
"method": "popup",
"minutes": 10
}
],
"notificationSettings": {
"notifications": [
{
"type": "eventCreation",
"method": "email"
},
{
"type": "eventChange",
"method": "email"
},
{
"type": "eventCancellation",
"method": "email"
},
{
"type": "eventResponse",
"method": "email"
}
]
},
"primary": true,
"conferenceProperties": {
"allowedConferenceSolutionTypes": [
"hangoutsMeet"
]
}
},
{
"kind": "calendar#calendarListEntry",
"etag": "\"111111111111111111111111\"",
"id": "en.usa#holiday@group.v.calendar.google.com",
"summary": "Holidays in United States",
"description": "Holidays and Observances in United States",
"timeZone": "UTC",
"colorId": "8",
"backgroundColor": "#16a765",
"foregroundColor": "#000000",
"selected": true,
"accessRole": "reader",
"defaultReminders": [],
"conferenceProperties": {
"allowedConferenceSolutionTypes": [
"hangoutsMeet"
]
}
},
{
"kind": "calendar#calendarListEntry",
"etag": "\"1662297009786000\"",
"id": "addressbook#contacts@group.v.calendar.google.com",
"summary": "Birthdays",
"description": "Displays birthdays, anniversaries, and other event dates of people in Google Contacts.",
"timeZone": "UTC",
"colorId": "13",
"backgroundColor": "#92e1c0",
"foregroundColor": "#000000",
"selected": true,
"accessRole": "reader",
"defaultReminders": [],
"conferenceProperties": {
"allowedConferenceSolutionTypes": [
"hangoutsMeet"
]
}
}
]
}
}
{
"error": "Unauthorized. Invalid API key."
}
{
"errors": [
{
"msg": "an account id is required.",
"param": "accountId",
"location": "query"
}
]
}
{
"success": false,
"error": "Invalid account id. Account Not Found",
"code": 404
}
Get a Calendar by ID
GET
https://api.pyas.io/google/calendars/{id}
Gets a calendar by id
Path Parameters
Name
Type
Description
{id}*
String
The id of the calendar to retrieve
Query Parameters
Name
Type
Description
accountId*
String
The user's Pyas account id. This is returned when you connect an account to Pyas
Headers
Name
Type
Description
x-api-key*
String
API key
{
"success": true,
"calendar": {
"kind": "calendar#calendar",
"etag": "\"000000000000000000\"",
"id": "some-user@gmail.com",
"summary": "some-user@gmail.com",
"timeZone": "UTC",
"conferenceProperties": {
"allowedConferenceSolutionTypes": [
"hangoutsMeet"
]
}
}
}
{
"success": false,
"error": "Invalid account id. Account Not Found",
"code": 404
}
{
"error": "Unauthorized. Invalid API key."
}
{
"errors": [
{
"msg": "an account id is required.",
"param": "accountId",
"location": "query"
},
{
"msg": "account id must be a string",
"param": "accountId",
"location": "query"
}
]
}
{
"success": false,
"error": "Not Found",
"code": 404
}
Last updated