Pyas Docs
  • 📖Getting Started With Pyas
  • Fundamentals
    • 📦Pyas Apps
    • 📦Provider Apps
    • 🔒Pyas Auth vs Native Auth
    • 🛠️Getting set up
      • 🧑Inviting Team Members
      • 📦Creating an App
      • 🔒Setup Authentication
        • Pyas Auth
        • Native Auth
          • Create a Google App
          • Create an Azure App
          • Create a Zoom App
        • 🔗Connect an Account
      • 🪝Create Webhooks
    • ✨Connected Accounts
      • Zoom
  • REST API Reference
    • Introduction
    • API Authentication
    • Google Calendar
      • 🔒Auth
      • 🗓️Calendars
      • 🕢Events
    • Microsoft Outlook
      • 🔒Auth
      • 🗓️Calendars
      • 🕢Events
    • Zoom
      • 🔒Auth
      • 🕢Meetings
  • Get the Postman Collection
Powered by GitBook
On this page
  • Get All Calendars
  • Get a Calendar by ID
  1. REST API Reference
  2. Google Calendar

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
}
PreviousAuthNextEvents

Last updated 3 months ago

🗓️