Chrome Extension: Integrating with Google Calendar API

I’m developing a Chrome extension, which needs to call the Google Calendar API. I start with the quick start tutorial (for javascript) here:

https://developers.google.com/calendar/quickstart/js

And it works. But when I copied and pasted all the code into the extension html (which is popup.html in the official tutorial), it doesn’t work. I cannot see the “Authorize” button in the popup page.

I suspect that the inputted “Authorized JavaScript origins” caused error (now I inputted “http://localhost:8000“). Or am I following a wrong example for making a Chrome Extension? Thanks!

Google Chrome extension – integrate with Google Calendar

How can a Chrome extension alter the Google Calendar event editing UI?

I see that, for example, the Moxtra extension has managed to inject UI including a button just below the location. According to their YouTube video they added a button to fill out the event description although when I installed Moxtra this no longer seems to work.

Stepping back from this a bit, it occurs to me that editing the Google Calendar page seems like something that could easily get messed up by future changes to Google Calendar. Perhaps it is better to edit the event description from the extension’s own UI? If so, how can that be done?

Thanks.

Getting push notification for calendar events in chrome extension

I have integrated Google Calendar APIs with my Chrome Extension.

I need to get notification in my extension, when I schedule an calendar event from any client. How can I get this feature?

Was reading about Google Calendar Push, But this pushes to a SSL certified webpage. Is it possible to receive notifications directly in the extension?

Google Chrome Extension – Google Calendar Api Integration

I am new to chrome extension development. I need to invoke the Google Calendar Api’s from my Chrome Extension. I have few doubts in doing this.

  1. What is the type need to be selected in developer console(eg:-android)?
  2. What are the information need to be provided in creating the developer project?

I need to develop this with my locally loaded project. Please guide me.

Chrome.identity. How to prolong Google authentication token in Chrome extensions?

I’m developing an extension, which requests authentication with Google Calendar.

The built-in method in Chrome API chrome.identity works almost fine, but there is the issue.

Let’s say, a user is authorized in Chrome with account [email protected], but wants to get an access to another account [email protected].

While starting the extensions, I run chrome.identity.getAuthToken({interactive: true}), user authorises the extension, and I get the token.

The problem appears, specifically with the secondary account. The auth token expires, approximately in an hour. And the only way to get a new one chrome.identity.getAuthToken({interactive: true}), i.e. users interaction is required.

Although, if a user chooses authentication with primary account [email protected], I can just run chrome.identity.getAuthToken({interactive: false}) to refresh auth token.

And the question is how can I prolong the lifetime of auth token if a user chooses the secondary account [email protected] without users interaction?

Thanks.

Add a text box in google calendar

I want to insert text box in google calendar using google calendar API. I searched in google regarding this, I did not get any links for this.

How can I use access tokens to insert new Google Calendars and events via JavaScript?

I’m trying to create a Chrome extension that creates Google Calendars and inserts events into those calendars, but I’m running into a little difficulty using the Google Calendar API since there don’t seem to be any concrete examples in JavaScript. Here’s what I have so far:

chrome.identity.getAuthToken({ interactive: true }, function(token) {
    if (chrome.runtime.lastError) {
        alert(chrome.runtime.lastError.message);
        return;
    }
    var x = new XMLHttpRequest();
    x.open('GET', 'https://www.googleapis.com/calendar/v3/users/me/calendarList?access_token=' + token);
    x.onload = function() {
        alert(x.response);
    };
    x.send();
});

This gets me as far as successfully getting an access token and using that to retrieve the calendar list of an authorized user–I can verify that that snippet works. So, I should be able to modify this from a GET request to a POST or something similar to create a Calendar or insert events into a Calendar, given the Calendar’s ID–my question is how can I go about this?

My current structure is a JavaScript content script that injects a button into a web page, processes the page data, and sends that data to a background page (from where the above snippet was taken), which is supposed to get access to a user’s calendars and then create a Calendar and insert events into that Calendar using the page data. So far, the content script works perfectly and I can get valid access tokens from the background page, so it’s just this last stage of insertion that I’m stuck on.

Using access tokens to insert new Google Calendars and events via JavaScript?

I’m trying to create a Chrome extension that can create Google Calendars and insert events into those calendars, but I’m running into a little difficulty with usage of the Google Calendar API since there don’t seem to be any concrete examples using JavaScript. Here’s what I have so far:

chrome.identity.getAuthToken({ interactive: true }, function(token) {
    if (chrome.runtime.lastError) {
        alert(chrome.runtime.lastError.message);
        return;
    }
    var x = new XMLHttpRequest();
    x.open('GET', 'https://www.googleapis.com/calendar/v3/users/me/calendarList?access_token=' + token);
    x.onload = function() {
        alert(x.response);
    };
    x.send();
});

This gets me as far as successfully getting an access token and using that to retrieve the calendar list of an authorized user. How can I modify this to create a Calendar or insert events into one (given a Calendar ID)?

My current structure is a JavaScript content script that injects a button into a web page, processes the page data, and sends that data to a background page (from where the above snippet was taken), which is supposed to get access to a user’s calendars and then create a Calendar and insert events into that Calendar using the page data. So far, the content script works perfectly and I can get valid access tokens from the background page, so it’s just this last stage of insertion that I’m stuck on.