Skip to content

Add no-auth user avatar API endpoint

When I build an application that shows information about Git repositories, I want to be able to show user avatars beside commits based on the commit author, but the User API does not allow users to be searched by email. We should add an API specifically for getting a user by email address.

Proposal

Add a new avatar route /api/v4/avatar?email=<email>&size=<size>

The route should return a URL to an image if a user with a matching email exists and the user has an avatar, otherwise 404.

No authentication should be required.

Links

https://docs.gitlab.com/ee/api/users.html

Edited by James Ramsay (ex-GitLab)