所以我想向在Google日历上创建的活动的参与者发送邀请电子邮件。但是当我这样做的时候>
use Spatie\GoogleCalendar\Event as GoogleCalendarEvent; $calendarEvent = new GoogleCalendarEvent; $calendarEvent->name = $event->title; $calendarEvent->startDateTime = $event->start_date; $calendarEvent->endDateTime = $event->end_date; $calendarEvent->addAttendee(['email' => '[email protected]']); $calendarEvent->save();
我收到错误为
{ "error": { "errors": [{ "domain": "calendar", "reason": "forbiddenForServiceAccounts", "message": "Service accounts cannot invite attendees without Domain-Wide Delegation of Authority." } ], "code": 403, "message": "Service accounts cannot invite attendees without Domain-Wide Delegation of Authority." } }
因此,我已经授予了服务凭据整个域的权限。但是我仍然遇到错误,因为我尝试邀请使用服务帐户的用户。如何使用Spatie \ GoogleCalendar在laravel 7中模拟使用此服务帐户的用户?
我曾尝试浏览google的api和spatie的文档。但我找不到任何
所以我想向在Google日历上创建的活动的参与者发送邀请电子邮件。但是当我确实使用Spatie \ GoogleCalendar \ Event作为GoogleCalendarEvent时; $ calendarEvent =新的GoogleCalendarEvent; ...
当前,服务帐户不允许未经模拟地邀请与会者。