The easiest way to convert your google calendar into a REST API.
With Google Calendar, you can quickly schedule meetings and events and get reminders about upcoming activities, so you always know what’s next.
After you create an account and log in to the dashboard, choose Google Calendar on the collections page. To make Google Calendar API you have to Authenticate your Google Calendar Account by click on the "Authenticate Account" at the top of the Google Calendar form.
After authenticating you will be redirected back to the SlashApi with a Google Calendar Form. In this form, you just need to provide a name for your API, click on the Submit button and your Google Calendar API is ready.
Returns the calendars on your calendar list.
var axios = require('axios');
var config = {
method: 'get',
url: 'https://v1.slashapi.com/slashapi/google-calendar/ax2Q0ZzBni'
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
{
"etag": "\"p330afo6os69v40g\"",
"kind": "calendar#calendarList",
"nextSyncToken": "CMCn4Njhk_ICEhJhbhzGMjE1OUBnFWbpbC5jb20=",
"data": [
{
"accessRole": "owner",
"backgroundColor": "#f83a22",
"colorId": "3",
"etag": "\"1627956268504000\"",
"foregroundColor": "#000000",
"id": "hn1s7q1ckmjqpf4hj2ib2n62ps@group.calendar.google.com",
"kind": "calendar#calendarListEntry",
"selected": true,
"summary": "Demo",
"timeZone": "Asia/Jakarta",
"defaultReminders": [],
"conferenceProperties": {
"allowedConferenceSolutionTypes": [
"hangoutsMeet"
]
}
}
]
}
Returns list of events on the specified calendar.
Parameter | Description |
---|---|
start | Start date (Y-m-d) |
end | End date (Y-m-d) |
orderBy | The order of the events returned in the result. default "startTime" |
q | Free text search terms to find events that match these terms in any field, except for extended properties. Optional. |
var axios = require('axios');
var config = {
method: 'get',
url: 'https://v1.slashapi.com/slashapi/google-calendar/ax2Q0ZzBni/id.indonesian%23holiday%40group.v.calendar.google.com?start=2021-01-01&end=2021-01-29&orderBy=starttime&q=tahun baru'
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
{
"accessRole": "owner",
"etag": "\"p3248ps71s69v40g\"",
"kind": "calendar#events",
"summary": "Demo",
"timeZone": "Asia/Jakarta",
"updated": "2021-08-03T02:04:47.637Z",
"defaultReminders": [],
"data": [
{
"created": "2021-08-01T14:25:53.000Z",
"etag": "\"3255912575274000\"",
"eventType": "default",
"htmlLink": "https://www.google.com/calendar/event?eid=NnNzaW92OTRzYWZycWlsNm9tYjdscGExdjAgaG4xczdxMWNrbWpxcGY0aGoyaWIybjYycHNAZw",
"iCalUID": "6ssiov94safrqil6omb7lpa1v0@google.com",
"id": "6ssiov94safrqil6omb7lpa1v0",
"kind": "calendar#event",
"sequence": 2,
"status": "confirmed",
"summary": "First Event",
"updated": "2021-08-03T02:04:47.637Z",
"creator": {
"email": "alfa2159@gmail.com"
},
"organizer": {
"displayName": "Demo",
"email": "hn1s7q1ckmjqpf4hj2ib2n62ps@group.calendar.google.com",
"self": true
},
"start": {
"dateTime": "2021-08-02T06:45:00+07:00"
},
"end": {
"dateTime": "2021-08-02T07:45:00+07:00"
},
"reminders": {
"useDefault": true
}
}
]
}
Get single event data
var axios = require('axios');
var config = {
method: 'get',
url: 'https://v1.slashapi.com/slashapi/google-calendar/ax2Q0ZzBni/id.indonesian%23holiday%40group.v.calendar.google.com/20210101_2piunva6hrdd5g1bi5bnhgt334'
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
{
"data": {
"created": "2021-08-01T14:25:53.000Z",
"etag": "\"3255912575274000\"",
"eventType": "default",
"htmlLink": "https://www.google.com/calendar/event?eid=NnNzaW92OTRzYWZycWlsNm9tYjdscGExdjAgaG4xczdxMWNrbWpxcGY0aGoyaWIybjYycHNAZw",
"iCalUID": "6ssiov94safrqil6omb7lpa1v0@google.com",
"id": "6ssiov94safrqil6omb7lpa1v0",
"kind": "calendar#event",
"sequence": 2,
"status": "confirmed",
"summary": "First Event",
"updated": "2021-08-03T02:04:47.637Z",
"creator": {
"email": "alfa2159@gmail.com"
},
"organizer": {
"displayName": "Demo",
"email": "hn1s7q1ckmjqpf4hj2ib2n62ps@group.calendar.google.com",
"self": true
},
"start": {
"dateTime": "2021-08-02T06:45:00+07:00"
},
"end": {
"dateTime": "2021-08-02T07:45:00+07:00"
},
"reminders": {
"useDefault": true
}
}
}
Add new event into your calendar
Parameter | Description |
---|---|
attendees[] | The attendees of the event |
attendees[].additionalGuests | Number of additional guests. Optional |
attendees[].comment | The attendee's response comment. Optional |
attendees[].displayName | The attendee's name, if available. Optional |
attendees[].email | The attendee's email address, if available. This field must be present when adding an attendee |
attendees[].responseStatus | The attendee's response status. Possible values are:
|
description | Description of the event. Can contain HTML. Optional. |
end.date | The date, in the format "yyyy-mm-dd", if this is an all-day event. |
end.dateTime | The time, as a combined date-time value (formatted according to RFC3339) |
end.timeZone | The time zone in which the time is specified. (Formatted as an IANA Time Zone Database name |
location | Geographic location of the event as free-form text. Optional. |
source.title | Title of the source; for example a title of a web page or an email subject. |
source.url | URL of the source pointing to a resource. The URL scheme must be HTTP or HTTPS. |
start.date | The date, in the format "yyyy-mm-dd", if this is an all-day event. |
start.dateTime | The time, as a combined date-time value (formatted according to RFC3339) |
start.timeZone | The time zone in which the time is specified. (Formatted as an IANA Time Zone Database name |
status | Status of the event. Optional. Possible values are:
|
summary | Title of the event. |
{
"data": {
"start": {
"date": "2021-08-05"
},
"end": {
"date": "2021-08-05"
},
"attendees": [
{
"displayName": "Jane Due",
"email": "jane@domain.com",
"responseStatus": "needsAction"
}
],
"description": "Description of the event",
"location": "Bandung",
"summary": "Title of the event"
}
}
{
"data": {
"created": "2021-08-03T02:25:56.000Z",
"description": "Description of the event",
"etag": "\"3255915113674000\"",
"eventType": "default",
"htmlLink": "https://www.google.com/calendar/event?eid=ZmJmcG1tdnM1bzZya3VqcWFvMG9ha2VwOGMgaG4xczdxMWNrbWpxcGY0aGoyaWIybjYycHNAZw",
"iCalUID": "fbfpmmvs5o6rkujqao0oakep8c@google.com",
"id": "fbfpmmvs5o6rkujqao0oakep8c",
"kind": "calendar#event",
"location": "Bandung",
"sequence": 0,
"status": "confirmed",
"summary": "Title of the event",
"updated": "2021-08-03T02:25:56.837Z",
"creator": {
"email": "alfa2159@gmail.com"
},
"organizer": {
"displayName": "Demo",
"email": "hn1s7q1ckmjqpf4hj2ib2n62ps@group.calendar.google.com",
"self": true
},
"start": {
"date": "2021-08-05"
},
"end": {
"date": "2021-08-05"
},
"attendees": [
{
"displayName": "Jane Due",
"email": "jane@domain.com",
"responseStatus": "needsAction"
}
],
"reminders": {
"useDefault": false
}
}
}
Parameter | Description |
---|---|
attendees[] | The attendees of the event |
attendees[].additionalGuests | Number of additional guests. Optional |
attendees[].comment | The attendee's response comment. Optional |
attendees[].displayName | The attendee's name, if available. Optional |
attendees[].email | The attendee's email address, if available. This field must be present when adding an attendee |
attendees[].responseStatus | The attendee's response status. Possible values are:
|
description | Description of the event. Can contain HTML. Optional. |
end.date | The date, in the format "yyyy-mm-dd", if this is an all-day event. |
end.dateTime | The time, as a combined date-time value (formatted according to RFC3339) |
end.timeZone | The time zone in which the time is specified. (Formatted as an IANA Time Zone Database name |
location | Geographic location of the event as free-form text. Optional. |
source.title | Title of the source; for example a title of a web page or an email subject. |
source.url | URL of the source pointing to a resource. The URL scheme must be HTTP or HTTPS. |
start.date | The date, in the format "yyyy-mm-dd", if this is an all-day event. |
start.dateTime | The time, as a combined date-time value (formatted according to RFC3339) |
start.timeZone | The time zone in which the time is specified. (Formatted as an IANA Time Zone Database name |
status | Status of the event. Optional. Possible values are:
|
summary | Title of the event. |
{
"data": {
"start": {
"date": "2021-08-05"
},
"end": {
"date": "2021-08-05"
},
"attendees": [
{
"displayName": "Jane Due",
"email": "jane@domain.com",
"responseStatus": "needsAction"
}
],
"description": "Description of the event",
"location": "Bandung",
"summary": "New Title of the event"
}
}
{
"message": "Updated successfully",
"data": {
"created": "2021-08-03T02:25:56.000Z",
"description": "Description of the event",
"etag": "\"3255918682038000\"",
"eventType": "default",
"htmlLink": "https://www.google.com/calendar/event?eid=ZmJmcG1tdnM1bzZya3VqcWFvMG9ha2VwOGMgaG4xczdxMWNrbWpxcGY0aGoyaWIybjYycHNAZw",
"iCalUID": "fbfpmmvs5o6rkujqao0oakep8c@google.com",
"id": "fbfpmmvs5o6rkujqao0oakep8c",
"kind": "calendar#event",
"location": "Bandung",
"sequence": 0,
"status": "confirmed",
"summary": "New Title of the event",
"updated": "2021-08-03T02:55:41.019Z",
"creator": {
"email": "alfa2159@gmail.com"
},
"organizer": {
"displayName": "Demo",
"email": "hn1s7q1ckmjqpf4hj2ib2n62ps@group.calendar.google.com",
"self": true
},
"start": {
"date": "2021-08-05"
},
"end": {
"date": "2021-08-05"
},
"attendees": [
{
"displayName": "Jane Due",
"email": "jane@domain.com",
"responseStatus": "needsAction"
}
],
"reminders": {
"useDefault": false
}
}
}
{
"message": "deleted successfully"
}