3

User's photo URLs are available through the Directory API (I'm using the Java client, which shouldn't matter), however the URL provided is in the private scope, even when that user's profile image is set to public. This causes redirection to a generic silhouette image. I'm aware you can get the base64 encoded 96x96 pixel image via the user/photos API, however needing to serve GSuite's profile images myself is ridiculous. What is the correct flow to get user's image URLs for display?

Andrew Ring
  • 3,185
  • 1
  • 23
  • 28
  • Have a look at [this](https://stackoverflow.com/questions/52522003/missing-photos-in-google-admin-directory-users-response), [this](https://stackoverflow.com/questions/25467326/retrieving-google-user-photo) and [this](https://stackoverflow.com/questions/55938153/can-i-display-a-g-suite-user-photo-with-the-just-the-thumbnailphotourl). – ziganotschka May 21 '20 at 14:01
  • @ziganotschka I specifically call out these things in my question. The first link is discussing the fact that private URLs are returned, and doesn't address the issue that the user's profile picture is set to public, yet the private url is returned instead. The second and third links are using the base64 encoding, which then requires effectively self hosting. – Andrew Ring May 21 '20 at 19:58
  • @AndrewRing did it work out for you? Trying to achieve the same result. Also, I tried downloading the base64 image but it downloaded the silhouette image. How did you solve this? – Korenz Apr 14 '21 at 07:29
  • @Korenz Unfortunately, no, I was unable to resolve this with Google's support, and ended up serving these myself. – Andrew Ring Apr 27 '21 at 21:33

0 Answers0