设置用户群标签
接口说明
设置用户群标签
基本信息
名称 | 描述 |
---|---|
HTTP URL | https://minigame.zijieapi.com/mgplatform/api/apps/group_tag/set_user_group_tag |
HTTP Method | POST |
Scope | open.ttgame.mgplatform |
请求参数
请求头
access-token必填String
示例:08011218462b6b4b5054626e426e50685a7554643144644449413d3d
content-type必填String
示例:application/json
固定值"application/json"
Body
mp_id必填String
小游戏 appid
open_id必填String
目标用户的 open_id
status必填Int32
用户标签状态: 1-佩戴;3-删除
tag_id必填String
标签id (从平台上获取)
请求示例
curl --location 'https://minigame.zijieapi.com/mgplatform/api/apps/group_tag/set_user_group_tag' \ --header 'access-token: 080112184746516d61724a654242634f644b51447862474153413d3d' \ --header 'Content-Type: application/json' \ --data '{ "mp_id": "tt411d37a0de37d565", "open_id": "GOV.64fFjLb7xaEY", "tag_id": "547998720514", "status": 1 }'
响应参数
Body
err_msg必填String
err_no必填Int32
is_sandbox_request必填Bool
是否为沙盒环境调用,当标签状态为「待上架」时,返回 true,表示本次调用不会对真实用户设置生效
log_id必填String
响应 示例
正常响应示例异常响应示例
{ "BaseResp": { "StatusCode": 0, "StatusMessage": "" }, "err_msg": "", "err_no": 0, "is_sandbox_request": false, "log_id": "202507231122476FA277E45138900629A7" }
错误码
HTTP 状态码 | 错误码 | 错误码描述 | 排查建议 |
---|---|---|---|
200 | 28001004 | open_id invalid | 检查入参 |
200 | 28006062 | mp_id 非法 | 检查入参 |
200 | 28006065 | tag_id 非法 | 检查入参 |
200 | 28006066 | status 非法 | 检查入参 |
200 | 28006063 | 当前标签已过期 | 前往「运营能力」-「游戏群标签能力」进行有效期调整 |
200 | 28006064 | 当前标签状态不支持设置用户标签 | 待上架、已上架状态的标签才允许调用 |
200 | 28006067 | 标签不存在 | 检查入参 |
200 | 28001005 | 系统内部错误,请重试 | |
200 | 28001003 | access_token无效 | 重新请求生成access_token |