Reputation: 720
I tried to use the googleapi@27 to get the profile information but it gave me only following fields.
{
emailAddress: '[email protected]',
messagesTotal: 2122,
threadsTotal: 2111,
historyId: '116715'
}
I tried above with this(https://developers.google.com/gmail/api/quickstart/nodejs?authuser=1) example. I need all of the fields like firstname, lastname, email address, contact number & all of the fields available in user's profile
. So do you know any way by which i will be getting all of the fields of user's profile using googleapi under node js.
Upvotes: 1
Views: 447
Reputation: 116868
Gets the current user's Gmail profile.
A users gmail profile consists of
{
"emailAddress": string,
"messagesTotal": integer,
"threadsTotal": integer,
"historyId": unsigned long
}
The information you are looking for its not part of the Gmail api. The gmail api is a mail system it is not a user profile system. You should try looking into the People api or the google+ api.
People api is basically linked to google contacts so if the user has not filled in this information you wont get it back. Google+ api is linked to the google plus social media site. If the user has not set the information public for example phone number you will not be able to see it.
There is no really good way of getting this information back.
Update: after a big of googling it looks like the call for people and google+ is the same endpoint now. But the data comes from Google+ and contacts combined.
Upvotes: 1