Is it possible to get display name from google account email

Viewed 141

Abstract

I develop a Google API integration for a Saas product. One of its functions is to retrieve the email and displayName of the participants of an event registered in Google Calendar.(ref 1, same issue is reported)

At first I try to get email and display name from get method for google calendar events resources,but I found that many event participants have an email but no displayName.( ref 2,3 )

Then, I try to use google people api to get displayName from email but I couldn't find the way to get it.

Question If you know the way to get displayName from google account email, please tell me how to do it.

Reference

  1. Google Calendar API: Display Name doesn't work
  2. Google Calendar API, Events Resource representations
  3. Google Calendar API, Events Resource representations
1 Answers
  • The displayName availability depends either from that account's Name set at Google profile) or from the API caller's contact List in Google Contact.

  • If the caller and the affected account are within the same Google Workspace environment, then the domain's user profile Name is taken into account.

  • If that account is added to the caller's Contacts, then it is also possible to retrieve its Display Name via People API.

  • If the affected account doesn't have a name set nor it is within the caller's contacts, that's expected behavior.

Related