Avatar API
- Tier: Free, Premium, Ultimate
- Offering: GitLab.com, Self-managed, GitLab Dedicated
Get a single avatar URL
Get a single avatar URL for a user with the given email address.
If:
- No user with the given public email address is found, results from external avatar services are returned.
- Public visibility is restricted, response is
403 Forbidden
when unauthenticated.
This endpoint can be accessed without authentication.
GET /avatar?email=admin@example.com
Parameters:
Attribute | Type | Required | Description |
---|---|---|---|
email |
string | yes | Public email address of the user. |
size |
integer | no | Single pixel dimension (because images are squares). Only used for avatar lookups at Gravatar or at the configured Libravatar server. |
Example request:
curl "https://gitlab.example.com/api/v4/avatar?email=admin@example.com&size=32"
Example response:
{
"avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=64&d=identicon"
}
Docs
Edit this page to fix an error or add an improvement in a merge request.
Create an issue to suggest an improvement to this page.
Product
Create an issue if there's something you don't like about this feature.
Propose functionality by submitting a feature request.
Feature availability and product trials
View pricing to see all GitLab tiers and features, or to upgrade.
Try GitLab for free with access to all features for 30 days.
Get help
If you didn't find what you were looking for, search the docs.
If you want help with something specific and could use community support, post on the GitLab forum.
For problems setting up or using this feature (depending on your GitLab subscription).
Request support