Код: Выделить всё
function endGoogleMeet($meetingId){
$accessToken = getAccessToken();
try {
$getConferenceRecordUrl = 'https://meet.googleapis.com/v2/conferenceRecords?filter=space.meeting_code='.$meetingId;
$conferences = curl_GET($getConferenceRecordUrl,$accessToken);
$spaceName = '';
if(!empty($conferences)){
$confDetails = $conferences['conferenceRecords'][0];
$spaceName = $confDetails['space'];
echo 'Found conference space with name: ' .$spaceName.' for meeting id '.$meetingId.PHP_EOL;
}else{
throw new Exception('Could not find meeting details');
}
if(!empty($spaceName)){
$endConfUrl = 'https://meet.googleapis.com/v2/'.$spaceName.':endActiveConference';
$response = curl_POST($endConfUrl, $accessToken);
echo 'Ended active conference'.PHP_EOL;
}
} catch (Exception $e) {
echo $e->getMessage();
}
}
Код: Выделить всё
{"error":{"code":403,"message":"Permission denied on resource MeetingSpace (or it might not exist)","status":"PERMISSION_DENIED"}}
Код: Выделить всё
$scopes = ['https://www.googleapis.com/auth/meetings.space.readonly', 'https://www.googleapis.com/auth/meetings.space.created'];
Упоминалось выше. Надеялся, что это сработает должным образом и встреча закончится.
Подробнее здесь: https://stackoverflow.com/questions/790 ... -403-error
Мобильная версия