-1
我想在網站上顯示我自己的日曆活動詳情。如何訪問我自己的Google日曆而不公開
爲此,我嘗試了使用帶有API密鑰和日曆ID的Google API調用。 但在這期間面臨的問題,我需要使日曆爲「公共」。
一旦我製作日曆,因爲公共活動的詳細信息正在提取,但是當我刪除日曆作爲公共問題發生時,出現錯誤404「未找到」。
我應該如何獲取日曆事件的詳細信息而不將日曆設爲公共日曆。
我使用這個代碼:
var mykey = 'Gtg-rtZdsreUr_fLfhgPfgff';
var calendarid = '[email protected]';
$.ajax({
type: 'GET',
url: encodeURI('https://www.googleapis.com/calendar/v3/calendars/' + calendarid+ '/events?key=' + mykey),
dataType: 'json',
success: function (response) {
console.log(response);
//do whatever you want with each
},
error: function (response) {
//tell that an error has occurred
}
});
退房服務帳戶 – DaImTo