如何通过PHP API管理我自己的Google日历中的活动

问题描述:

I want to create events in my own google Calendar through PHP API.

  1. Should I use Google Service Account for that ?
  2. I have followed google tutorials, and setup a service account , and created code to insert events into my calendar. The code is working fine, the events are not appearing on my calendar.
  3. It seems using service account, it's sending events to some other calendar belonging to the service account , but not to my own calendar.

Note: I have a web application, I just want to send some events in to my own google calendar ( not any other user's just my own single calendar).

我想通过PHP API在我自己的谷歌日历中创建活动。 p>

  1. 我应该使用Google服务帐户吗? li>
  2. 我已经按照谷歌教程,设置了服务帐户,并使用 创建代码将事件插入我的日历。 代码工作正常,事件没有出现在我的日历上。 li>
  3. 似乎使用服务帐户,它将事件发送到属于服务帐户的其他日历,但不发送到我自己的日历 。 li> ol>

    注意:我有一个网络应用程序,我只想将一些事件发送到我自己的谷歌日历(不是任何其他用户只是我自己的 单日历)。 em> p> div>

What I found so far is that using Service account is the right approach if you want to edit your own google calendar entries through API. But you need to give permissions to the service account for the calendar you wish to work on using google Calendar settings.

To give permission to service account, you just need to add the service account email ID (auto generated , when creating a service account) on the google calendar settings page , under "permissions" section.