Reputation: 377
I want to receive the first name and last name of the person by e-mail address. How can I do it? I thought to use the API from Google Plus, but Google is closing it. What other options are there?
Upvotes: 1
Views: 5222
Reputation: 765
You can try using People API. The API has a people.get
method which returns Resource: Person.
{
"resourceName": string,
"etag": string,
"metadata": {
object(PersonMetadata)
},
"locales": [
{
object(Locale)
}
],
"names": [
{
object(Name)
}
],
...
"emailAddresses": [
{
object(EmailAddress)
}
],
...
}
The field names
will return the object Name
which contains the following fields:
{
"metadata": {
object(FieldMetadata)
},
"displayName": string,
"displayNameLastFirst": string,
"familyName": string,
"givenName": string,
"middleName": string,
"honorificPrefix": string,
"honorificSuffix": string,
"phoneticFullName": string,
"phoneticFamilyName": string,
"phoneticGivenName": string,
"phoneticMiddleName": string,
"phoneticHonorificPrefix": string,
"phoneticHonorificSuffix": string
}
Upvotes: 1