本文介绍了在Google Calendar Api中使与会者成为组织者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用googleapis npm包创建日历事件.这是我请求calendar.events.insert创建事件的有效负载.
I'm using googleapis npm package to create calendar events with.This is my request payload for calendar.events.insert to create an event.
{
"summary":"Biology class",
"location":"Google Meet: Please follow the google meet url",
"description":"Unit and Measurements",
"colorId":2,
"start":{"dateTime":"2020-06-13T11:00:00+05:30","timeZone":"Asia/Kolkata"},
"end":{"dateTime":"2020-06-13T12:00:00+05:30","timeZone":"Asia/Kolkata"},
"attendees":[
{"email":"[email protected]"},
{"email":"[email protected]","organizer":true}
],
"reminders":{
"useDefault":false,
"overrides":[{"method":"email","minutes":10},{"method":"popup","minutes":10}]
},
"creator": {
"email": "[email protected]",
"self": true
},
"organizer":{
"email":"[email protected]",
"self":true
}
}
我想让与会者成为组织者,以便他可以开始会议.我是否在请求有效负载中缺少某些内容?还是我需要授予他们权限?
I want to make attendees as the organizer so that he can start the meeting.Am I missing something in request payload? or do I need to grant them permission?
推荐答案
默认情况下,运行代码的人(并对其进行身份验证)将被设置为创建者和组织者
-
creator
和organizer
是只读值,因为您可以阅读此处 - 如果您想让自己成为活动的所有者/组织者,则需要使用全域授权的noreferrer>服务帐户.a>
- 这将允许您验证用户身份并代表用户行事
- 由用户创建活动将自动使他成为活动的所有者和组织者
- 请注意,使用服务帐户,您只能假冒来自与您相同的域的用户
creator
andorganizer
are read-only values, as you can read here- If you want to make somebody else than yourself the event owner / organizer, you need to use a service account with domain-wide delegation
- This would allow you to authenticate as the user and act on his behalf
- Creating the event om behalf of the user will automatically make him the event owner and organizer
- Note that with a service account you can only impoersonate users if they are from the same domain like you
By default it is the person who runs the code (and authenticates as himself) who will be set as the creator and organizer
这篇关于在Google Calendar Api中使与会者成为组织者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!