当前用户
GET /me
Section titled “GET /me”需要含有 openid 的有效 Access Token。返回内容受授权 scopes 限制。
curl https://account.ylfcat.top/api/v1/me \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -H 'accept: application/json'{ "sub": "usr_01J...", "preferred_username": "YLF_Cat", "name": "YLF_Cat", "picture": "https://account.ylfcat.top/api/v1/avatar/0123456789abcdef0123456789abcdef", "email": "123456@qq.com", "email_verified": true}sub 始终存在。没有 profile 时会省略 preferred_username、name 与 picture;没有 email 时会省略 email 与 email_verified。不要假设可选字段始终存在。
第一方账号中心也使用同一路径,但通过 HttpOnly 会话 Cookie 获取完整账号资料;第三方应用不得依赖或尝试使用 Cookie 响应结构。