A AuthMS API Wiki API Reference iam.tianv.com →

GET /notifications/preferences/{user_id}

获取指定用户的通知接收偏好,包括各渠道开关、免打扰时段等设置 参考:CAN-SPAM Act (15 U.S.C. §7701) — Commercial Email Compliance。

通知服务 `bearerAuth` application/json

Request Parameters

NameInTypeRequiredDefaultExampleConstraintsDescription
user_id path string Yes 用户ID

Responses

StatusDescriptionSchema
200偏好设置dto.NotificationPreferencesDetailResponse
400请求参数错误gitee_com_linmes_authms_base_dto.SimpleResponse
401未认证gitee_com_linmes_authms_base_dto.SimpleResponse
403权限不足gitee_com_linmes_authms_base_dto.SimpleResponse
404资源未找到gitee_com_linmes_authms_base_dto.SimpleResponse
500服务内部错误gitee_com_linmes_authms_base_dto.SimpleResponse

Referenced Schemas

dto.NotificationPreferencesDetailResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
data dto.NotificationPreferencesResponse No
message string No
timestamp string No

dto.NotificationPreferencesResponse

用户通知偏好设置

FieldTypeRequiredExampleConstraintsDescription
channels object No 渠道设置
email_enabled boolean No True 邮件启用
push_enabled boolean No True 推送启用
quiet_hours object No 免打扰时段
sms_enabled boolean No False 短信启用
type_prefs object No 通知类型偏好
updated_at string No 2026-04-15T10:30:00Z 更新时间
user_id string No usr_abc123 用户ID

gitee_com_linmes_authms_base_dto.SimpleResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
message string No
timestamp string No