go-memo

🪴 A REST API to get calendar events from google calendar and keep track of important notes from the meeting

MIT License

Stars
6
Committers
1

Google Calendar API Integration with Go

This guide helps you integrate the Google Calendar API with a Go application. By following these steps, you will be able to authenticate with Google and access calendar events programmatically.

Prerequisites

Before starting, ensure you have the following:

Setup Instructions

1. Create a Google Cloud Project

  1. Visit the Google Cloud Console.
  2. Click on the project drop-down menu at the top of the page and select New Project.
  3. Enter a project name and click Create.

2. Enable the Google Calendar API

  1. In the Google API Library, search for "Google Calendar API".
  2. Click on Google Calendar API and then click Enable.

3. Configure OAuth Consent Screen

  1. Navigate to the OAuth consent screen.
  2. Choose External as the user type and click Create.
  3. Fill in the necessary details, such as app name and user support email, and click Save and Continue.

4. Create OAuth 2.0 Credentials

  1. Go to the Credentials page.
  2. Click on Create Credentials and select OAuth client ID.
  3. Choose Web application as the application type.
  4. Add authorized redirect URIs. For development, you can use http://localhost:8080/callback.
  5. Click Create and save the client ID and client secret.

5. Install the Google API Client Library for Go

In your Go project directory, run the following command to install the Google Calendar API client:

go get google.golang.org/api/calendar/v3