I am creating an application that gets calendar events from Google Calendar using their API. I am not able to get the creator.displayName parameter for G Suite accounts, however. To rule out that it was something in my code I simply created a calendar Event from the calendar.google.com site and went to the API Explorer (https://developers.google.com/apis-explorer/#p/calendar/v3/calendar.events.list) to look at the event.
As it turns out, G Suite users don't have a displayName parameter but resources and standard Google Calendar users do.
For a G Suite Resource account I get something like:
{
"kind": "calendar#event",
"etag": "\"123456789220000\"",
"id": "<unique-ID-here>",
"status": "confirmed",
"htmlLink": "https://www.google.com/calendar/event?eid=unique-eid-link-here",
"created": "2018-02-27T13:00:07.000Z",
"updated": "2018-02-27T13:00:07.160Z",
"summary": "Event Name",
"creator": {
"email": "[email protected]"
},
"organizer": {
"email": "[email protected]",
"displayName": "A Resource Account",
"self": true
},
"start": {
"dateTime": "2018-02-27T05:52:00-08:00"
},
"end": {
"dateTime": "2018-02-27T06:00:00-08:00"
},
"iCalUID": "[email protected]",
"sequence": 0,
"reminders": {
"useDefault": true
}
And for a personal account I get:
{
"kind": "calendar#event",
"etag": "\"1234567890015265\"",
"id": "unique-id-here",
"status": "confirmed",
"htmlLink": "https://www.google.com/calendar/event?eid=unique-eid-here",
"created": "2018-02-27T13:00:04.000Z",
"updated": "2018-02-27T13:00:05.014Z",
"summary": "Event Name 2",
"creator": {
"email": "[email protected]",
"displayName": "John Doe",
"self": true
},
"organizer": {
"email": "[email protected]",
"displayName": "John Doe",
"self": true
},
"start": {
"dateTime": "2018-02-27T08:00:00-05:00"
},
"end": {
"dateTime": "2018-02-27T09:00:00-05:00"
},
"iCalUID": "[email protected]",
"sequence": 0,
"reminders": {
"useDefault": true
}
}
Where the displayName is apparent under the organizer. But for the admin or any user in the GSuite I get the following:
{
"kind": "calendar#event",
"etag": "\"123459678950000\"",
"id": "unique-id-here",
"status": "confirmed",
"htmlLink": "https://www.google.com/calendar/event?eid=unique-eid-here",
"created": "2018-02-27T14:00:14.000Z",
"updated": "2018-02-27T14:00:24.391Z",
"summary": "Event Name 3",
"creator": {
"email": "[email protected]",
"self": true
},
"organizer": {
"email": "[email protected]",
"self": true
},
"start": {
"dateTime": "2018-02-27T07:30:00-08:00"
},
"end": {
"dateTime": "2018-02-27T08:00:00-08:00"
},
"iCalUID": "[email protected]",
"sequence": 0,
"reminders": {
"useDefault": true
}
Am I missing something? Why don't G Suite users have the displayName parameter by default?