簡體   English   中英

Google Calendar API - 通過電子郵件創建和共享

[英]Google Calendar API - Create & Share via email

所有的舊問題都已經過時了 3-8 年。 需要谷歌日歷 API V3 的幫助。

  1. 我不知道如何從本文檔中專門邀請電子郵件到日歷: https : //developers.google.com/calendar/v3/reference/acl

我看到如何設置所選日歷的共享權限,但是我們要將要共享的電子郵件放在哪里??

所以我猜你想通過電子郵件分享你的日歷,這是我在 python 中的工作代碼:

    #ACL INSERT add partecipant to a calendar
    def update_calendar_by_adding_partecipant_to_a_calendar():
        id = "mail@gmail.com"
        url = "https://www.googleapis.com/calendar/v3/calendars/"+ id +"/acl"

        payload = {
                  "role": "reader",
                  "scope": [{ 
                    "type": "user",
                    "value": "mail@gmail.com"
                  }]
        }

        response = requests.request("POST", url, headers=headers, data=json.dumps(payload))
        json_response = response.text
        json_share=json.loads(json_response)
print(json_share)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM