Generate Google Calendar Api Key

Use the Google Developers Console to generate an API key and a Client ID: Create a project in the Google Developers Console. For example, create a project called iNotes Calendar. Search the Google API Library to find the Google Calendar API. Select it and click Enable. Click Credentials Create credentials API key.

Do not follow this guide if you are using OneSignal with a website or WordPress blog.

A Google Firebase Server Key is required for all Android mobile apps and Chrome apps & extensions. It is optional for Amazon apps.

What is a Firebase Server Key?

A Firebase Server Key and Firebase Sender ID are required in order to send push notifications to Android mobile app devices.

The goal of this section is to provision your Firebase Server Key and Firebase Sender ID for use in OneSignal.

Requirements

Generate google calendar api key download
  • An Android mobile app, Chrome app or extension, or an Amazon app. This is not for websites.
  • A Google account
  • A OneSignal Account, if you do not already have one.

Step 1: Create A Firebase Project

If you already have an FCM project you would like to use with OneSignal, you will need to retrieve your Sender ID and Firebase Cloud Messaging token. You may then skip to Step 2.

Visit the Firebase Console and sign in with your Google account.

Click CREATE NEW PROJECT or select an existing one below.

Enter a project name and press CREATE PROJECT.

Step 2: Getting Your Firebase Cloud Messaging Token And Sender ID

Click the gear icon in the top left and select Project settings.

Select the CLOUD MESSAGING tab.

Save the two values listed under Server key and Sender ID.

Step 3: Configure Your OneSignal App's Android Platform Settings

In the OneSignal dashboard, select your app from the All Apps page, then go to Settings. Under Native App Platforms, click Google Android.

Paste your Firebase Server Key and Firebase Sender ID into the fields and click Save.

Done! You now have a key to send push notifications from your app. 🥳

Next, install the OneSignal SDK in your app. If you need help, we have a few SDK-specific guides:

What's Next

Android SDK Setup
Amazon SDK Setup
Chrome Extension SDK Setup
Mobile Push Quickstart

In 2015 Google droppedsupportfor RSS feeds from its Calendar product. I am bad at Internet searchesand was not able to find the dozen projects that replace thisfunctionality, so I wrote my own.

This is a script that is intended to be run from a cronjob. It iswritten in Python 3 with lots of helper modules (requests, jinja2,dateutil ...). Note that since Google droppedsupportfor its goo.gl shortening service, we are now using thepyshorteners libraryfor URL shortening. This library is licensed under the GPL3 (whichshould be okay, since the Apache 2.0 license is GPL3-compatible).

There is a second script called gen_newsletter.py which willcreate the body of a plaintext email. You can use this to sendnewsletters about your events. There is a third script for generatingHTML bullet lists of events, but you probably do not want to use thatone.

There is a third script that is called schedule_event_tweets.py.This sends out tweets at random times about upcoming events. It ismoderately dangerous: first it generates tweet text and schedules themusing the at command. Then the at command launches a second scriptwhich (blindly!) tweets out the contents of the text. Don't use thisone in an untrusted environment.

There is a fourth script called gen_sidebar.py which generates anHTML bullet list. This is probably not helpful for you, but it can beused to embed events on a webpage.

Deployment

Get Google Calendar Api Key

  • Generate a Google Calendar API key, as described below.
  • Use virtualenv to set up a Python 3 environment: virtualenv -p /usr/bin/python3 venv
  • Activate the environment: source venv/bin/activate
  • Install dependencies: pip install -r requirements.txt
  • Copy config.py.example to config.py and customize it to yourneeds.
  • Run gen_rss.py or gen_newsletter.py or gen_sidebar.py orschedule_event_tweets.py

Generating an API key

Get Api Key Google Maps

  • Log into https://console.developers.google.com with a Google account(preferably the one that owns the Google calendar in question, butit does not really matter).
  • Create a new project.
  • Click on Enable API (or Library). Select the URL Shortener APIand enable it. Do the same for the Google Calendar API.
  • Click on Credentials, and then Create Credentials.
  • Create an API Key. Give it an appropriate name ('RSS/Newsletterkey'). Set the restriction to be IP Addresses, and enter the IPaddress of the host that will be running the scripts.

Google Calendar Api Tutorial

Caveats

Generate Google Calendar Api Key Code

  • The code is probably not production ready (but we are deploying itanyways). Among other things there is notmuch test coverage. There are no error messages.
  • Because it uses an API key, you can only generate feeds for publiccalendars.
  • This project is colonialist: it has only been tested in English, inthe America/Toronto timezone.
  • This project sources a file config.py that the end user canspecify on the commandline. This is really dangerous unless youtrust everybody who can run this script.
  • If you use a person's default calendar the title of the newsletterwill be the same as their email. The person will have to edit thename of the calendar in order for the scripts to display somethingsensible. (This is the 'summary' field returned by the API.)
  • By default we use the da.gd link shortener fornewsletters.