UserService.GetProfile
获取当前用户档案
GetProfileRequest 是空消息——调用方身份完全由 OAuth access token 决定。URL 里的 `me` 是保留字,含义为"当前 token 持有者";用 `/v1/users/{user_id}` 替代会被拒绝为 403 PERMISSION_DENIED。
Authentication
| 支持组合 | OAuth 2.0 | API Key |
|---|---|---|
| No identity | ||
| User identity | ||
| Org identity |
所需 scopes:user:profile:read
Response
200 OK · GetProfileResponse
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
user_id | string | — | — |
email | string | — | — |
email_verified | boolean | — | — |
phone | string | — | — |
phone_verified | boolean | — | — |
avatar | string | — | — |
name | string | — | — |
bio | string | — | — |
location | string | — | — |
website | string | — | — |
created_at | Timestamp | — | — |
updated_at | Timestamp | — | — |
default_api_version | string | — | 用户级 API 版本 pin。空字符串表示未 pin(调用方走平台默认)。设置时为 "YYYY-MM-DD" 形式(如 "2026-04-01"),每次请求都会按平台已发布的 API 版本注册表校验。 |
home_address | string | — | Home address — concrete street-level address (district + building + unit + room), distinct from `location` which is a city-level locale ("Beijing" / "San Francisco, CA"). Consumed by yihu (居家医疗呼叫) as the default contact_address for home… |
work_address | string | — | Work address — workplace street-level address. yihu uses this as contact_address when the LLM extracts address_type == "work" from the conversation ("on my way to the office", "I'll be at work" etc.). |
错误响应 · google.rpc.Status
非 2xx 响应均按 AIP-193 规范包装为google.rpc.Status,含 code /message /details 三段。details[].reason 是机器可读的具体错误原因码,可用于客户端分支处理。
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
code | integer (int32) | — | The status code, which should be an enum value of google.rpc.Code. |
message | string | — | A developer-facing error message. |
details | array<Any> | — | A list of messages that carry the error details. |
Examples
curl -X GET \
'https://api.appforges.com/v1/users/me' \
-H 'Authorization: Bearer $ACCESS_TOKEN'OpenAPI spec v0.59.4 · synced 10/11/2026, 11:27:14 PM