Avatar API

原文:https://docs.gitlab.com/ee/api/avatar.html

Avatar API

在 GitLab 11.0 中引入 .

Get a single avatar URL

使用给定的电子邮件地址为用户获取一个头像 URL.

If:

  • 找不到具有给定公共电子邮件地址的用户,返回来自外部化身服务的结果.
  • 公开可见性受到限制,未经身份验证时,响应将为403 Forbidden .

注意:无需身份验证即可访问此端点.

GET /avatar?email=admin@example.com 

Parameters:

Attribute Type Required Description
email string yes 用户的公共电子邮件地址.
size integer no 单像素尺寸(因为图像是正方形). 仅用于在Gravatar或已配置的Libravatar服务器上的头像查找.

请求示例:

curl "https://gitlab.example.com/api/v4/avatar?email=admin@example.com&size=32" 

响应示例:

{  "avatar_url":  "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=64&d=identicon"  } 
Copyright © 温玉 2021 | 浙ICP备2020032454号 all right reserved,powered by Gitbook该文件修订时间: 2021-03-27 13:48:25

results matching ""

    No results matching ""