4

how can we get the profile pic of google+ only with the email? or in the worse case, get the user id with the email?

We have a list of clients with their emails, and we want to display their profile picture in that list.

Is this posible in Javascript or PHP?

Regards

Flimm
  • 136,138
  • 45
  • 251
  • 267
Nixis Innovation
  • 51
  • 1
  • 1
  • 3
  • I think this is possible with the [Google+ API](https://developers.google.com/+/web/api/rest/). PHP is the way to go as this is more server side. – RepeaterCreeper Jan 04 '16 at 18:55
  • Not sure about google you can look in to https://en.gravatar.com/ – E_p Jan 04 '16 at 18:56
  • I have answered a similar question here. Please take a look to see how easy is to accomplish this with a totally free and open source project https://stackoverflow.com/a/46355569/845296 – epool Sep 22 '17 at 03:15
  • 1
    Possible duplicate of [Retrieving a user's public google/gmail picture](https://stackoverflow.com/questions/25606322/retrieving-a-users-public-google-gmail-picture) – Donald Duck Dec 15 '18 at 14:20
  • Google+ has been shut down, now. – Flimm Feb 22 '23 at 16:56

2 Answers2

4

Looks like Google does not allow you to get the profile picture just with the client's email. However, the API does allow.

Related: Find Google+ avatar for given email address without OAuth

Community
  • 1
  • 1
-1

There is an amazing API called gravatar

Follow this steps below

first you need to create md5 hash for the email address.

then attach the md5 hash to below url

https://www.gravatar.com/avatar/{md5 hash of email address}

eg.

https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50

read more about API at:

https://en.gravatar.com/site/implement

Nitin Shinde
  • 136
  • 9