Google Classroom API: Changes to the photoUrl field in the UserProfile resource

55 views
Skip to first unread message

Classroom Developer Announce

unread,
Oct 16, 2023, 12:48:03 PM10/16/23
to Classroom Developer Announce
Hi Classroom developers,

We plan to roll out a change to the photoUrl field in the UserProfile resource returned from the following endpoints:
  • courses.students.create
  • courses.students.get

  • courses.students.list

  • courses.teachers.create

  • courses.teachers.get

  • courses.teachers.list

  • userProfiles.get


The endpoints above currently return a user’s profile photo link in the photoUrl field for all requests made by an administrator regardless of whether contact sharing is on or off for the domain. After January 15, 2024, administrators will receive the photoUrl field with a link to a default image if contact sharing is turned off for the domain. This change will only impact the photoUrl field in the UserProfile resource. There will be no impact on requests made by teachers or students.

In order for administrators to continue retrieving the user’s profile photo link and not a default image link in the endpoints listed above, administrators need to turn on contact sharing for the domain. Contact sharing is a setting in the Admin Console that allows users to see profile data of other users within their domain across Google services. Administrators can also set up a custom directory if they want to limit who can see contact information of users in the domain.

If contact sharing is turned off in a domain, the photoUrl field value will contain a link to a default profile photo with the letter of the user’s first name, similar to the image above.


If contact sharing is off for the domain, you can alternatively use the Admin SDK Directory API to retrieve photoUrl information about users within a domain.


Best,

Classroom Developer Relations team

Reply all
Reply to author
Forward
0 new messages