NATSprofile.contact.bind绑定联系方式
Try it 面板需要启用 JavaScript。
绑定手机号 / 邮箱;OTP 工单由 profile_service 回源 otp_service 消费校验(scene=bind)。
Request Payload
消息格式:JSON
| Name | Data Type | Required | Description |
|---|---|---|---|
| userId | string | Yes | 用户 ID |
| channel | string | Yes | phone / email |
| target | string | Yes | 手机号或邮箱 |
| verifyTicketId | string | Yes | OTP 已验证工单(scene=bind) |
type RequestBody = {
/** 用户 ID */
userId: string
/** phone / email */
channel: string
/** 手机号或邮箱 */
target: string
/** OTP 已验证工单(scene=bind) */
verifyTicketId: string
}{
"userId": "01JD8SEGQ0P9N2XK4L7VDH3T6C",
"channel": "email",
"target": "chen.lin@example.com",
"verifyTicketId": "otv_2b74ce91f5608d3a"
}Response Payload
回复使用统一信封 {id, code, messages, result},其 result:
| Name | Data Type | Required | Description |
|---|---|---|---|
| contactId | string | Yes | 联系方式 ID |
| channel | string | Yes | 通道 |
| target | string | Yes | 绑定目标 |
| boundAt | string | Yes | 绑定时间 |
type ResponseBody = {
/** 联系方式 ID */
contactId: string
/** 通道 */
channel: string
/** 绑定目标 */
target: string
/** 绑定时间 */
boundAt: string
}{
"contactId": "01JD8SNP7N9R2W8YR3V6YEL0W4G",
"channel": "email",
"target": "chen.lin@example.com",
"boundAt": "2026-10-14T11:10:00Z"
}Response Code
回复使用统一信封 {id, code, messages, result},其 code 字段:
| code | Meaning | Notes |
|---|---|---|
| 0 | 成功 | 绑定联系方式 |
| 2009 | 目标已被占用 | |
| 2202 | OTP 工单无效 |
Examples
{
"userId": "01JD8SEGQ0P9N2XK4L7VDH3T6C",
"channel": "email",
"target": "chen.lin@example.com",
"verifyTicketId": "otv_2b74ce91f5608d3a"
}
{
"id": "01JD8SV59N1K7M4NJ",
"code": 0,
"messages": [],
"result": {
"contactId": "01JD8SNP7N9R2W8YR3V6YEL0W4G",
"channel": "email",
"target": "chen.lin@example.com",
"boundAt": "2026-10-14T11:10:00Z"
}
}