'Incomplete detail provide calendar detail API with service account
I am struggling with one of the Google calendar APIs. Here are the details.
Endpoint: https://www.googleapis.com/calendar/v3/calendars/<calendar_id>
Using code to call API
$access_token = "<access_token>";
$url = 'https://www.googleapis.com/calendar/v3/calendars/<calendar_id>';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer '. $access_token, 'Content-Type: application/json'));
$data = json_decode(curl_exec($ch), true);
$http_code = curl_getinfo($ch,CURLINFO_HTTP_CODE);
Which will return calendar details.
What i want: conferenceProperties with hangoutsMeet option.
-Fine with admin account: it return conferenceProperties
Api response =>
{
"kind": "calendar#calendar",
"etag": "\"Oak6r8-59oLpNX7HJIoVDyu5NLA\"",
"id": "<calendar_id>",
"summary": "8. Liverpool Street VHT",
"timeZone": "Europe/London",
"conferenceProperties": {
"allowedConferenceSolutionTypes": [
"hangoutsMeet"
]
}
}
-Issue with service account: this is not returning conferenceProperties which we want.
Api response =>
{
"kind": "calendar#calendar",
"etag": "\"yeoDqC9bq2XMtTKibM-ToPIDR2g\"",
"id": "<calendar_id>",
"summary": "8. Liverpool Street VHT",
"timeZone": "Europe/London"
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
