• Модуль: dav
  • Путь к файлу: ~/bitrix/modules/dav/classes/general/groupdavclientcalendar.php
  • Класс: CDavGroupdavClientCalendar
  • Вызов: CDavGroupdavClientCalendar::setGoogleCalendarOAuth
public function setGoogleCalendarOAuth($id)
{
	CModule::includeModule('socialservices');

	$googleOAuthClient = new CSocServGoogleOAuth($id);
	$googleOAuthClient->getEntityOAuth()->addScope([
		'https://www.googleapis.com/auth/calendar',
		'https://www.googleapis.com/auth/calendar.readonly'
	]);
	if ($token = $googleOAuthClient->getStorageToken())
	{
		$this->setGoogleOAuth($token);
	}
}