[英]Google Calendar API - Create & Share via email
所有的旧问题都已经过时了 3-8 年。 需要谷歌日历 API V3 的帮助。
我看到如何设置所选日历的共享权限,但是我们要将要共享的电子邮件放在哪里??
所以我猜你想通过电子邮件分享你的日历,这是我在 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.