X-GEHUB-TOKEN 请在后台「客户端」创建或重置凭据后复制(不是 Client Secret 本身),仅通过 HTTPS 发送。节点由客户端默认绑定决定,appId 为兼容占位,不用于选择节点。写操作必须提供新的 Idempotency-Key(8–128 位字母、数字、点、下划线、冒号或短横线);同一操作重试必须复用原值。危险操作另需 X-Confirm-Risk: destructive。首次微信登录和回调配置请在后台完成。 客户端需启用对应模块权限。
必填,8–128 位;同一操作重试复用原值,新操作换新值。
{
"appId": "{{appid}}",
"toWxid": "wxid**nquqz22",
"content": "<?xml version=\"1.0\"?>\n<msg>\n\t<location x=\"27.690519\" y=\"106.937958\" scale=\"15\" label=\"贵州省遵义市红花岗区合众路16号\" maptype=\"0\" poiname=\"冰岛咖啡(合众路店)\" poiid=\"qqmap_16018756252331389352\" buildingId=\"\" floorName=\"\" poiCategoryTips=\"娱乐休闲:咖啡厅\" poiBusinessHour=\"08:00-02:00\" poiPhone=\"0851-28986688\" poiPriceTips=\"0.0\" isFromPoiList=\"true\" adcode=\"\" cityname=\"\" />\n</msg>\n"
}curl --location 'https://wxapi.xiaoyu.fan/gehub/v2/api/message/postLocation' \
--header 'X-GEHUB-TOKEN: {{gehub-token}}' \
--header 'Idempotency-Key: {{idempotency-key}}' \
--header 'Content-Type: application/json' \
--data '{
"appId": "",
"toWxid": "wxid**nquqz22",
"content": "<?xml version=\"1.0\"?>\n<msg>\n\t<location x=\"27.690519\" y=\"106.937958\" scale=\"15\" label=\"贵州省遵义市红花岗区合众路16号\" maptype=\"0\" poiname=\"冰岛咖啡(合众路店)\" poiid=\"qqmap_16018756252331389352\" buildingId=\"\" floorName=\"\" poiCategoryTips=\"娱乐休闲:咖啡厅\" poiBusinessHour=\"08:00-02:00\" poiPhone=\"0851-28986688\" poiPriceTips=\"0.0\" isFromPoiList=\"true\" adcode=\"\" cityname=\"\" />\n</msg>\n"
}'{
"ret": 200,
"msg": "操作成功",
"data": {
"toWxid": "wxid_c2q****ipg22",
"createTime": 1778032487,
"msgId": 0,
"newMsgId": 195865128404704362,
"type": 48
}
}