1. 修改用信

用信设置接口:

PUT:http://api.xdua.com/uinf/{uid}

字段名 位置 字段类型 字段说明 举例 可选
apiv head string API版本,默认是1.0.0 1.0.0 可选
Authorization head string 客户端保存的鉴权token,登陆是获取 Authorization字符串 必选
uid path string 用户的id 8位字符串 必须
data body string 修改的新值 json 字符串 必选

返回数据

成功返回

{
    "error": 0,
    "reason": "Success",
    "result": None
}

失败返回

{    
    "error": >0,
    "reason": "失败原因",
    "result": {}
}

1.1. 错误码

错误码来自于error字段

通用错误码参考
用信错误码参考

1.2. Browser SDK调用示例代码

    const dua = await lovearth({
        APP_KEY: "您的appkey",
        APP_SECRET: "您的appsecret",
    })
    api_name = "修改用信";
    res = await dua.putUinf('8位的用户id',{'height':新的身高,"weight":新的体重})
    console.log(res);
    if(res.error == 0){
        console.log(api_name+"成功");
    }else{
        console.log(api_name+"失败 "+res.reason);
    }

results matching ""

    No results matching ""