alibaba.dc.uc.user.update (根据id更新用户信息)

根据id更新用户信息

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
req UpdateUserByIdReq 必须 用户信息
  • └ title
  • String
  • 可选
  • 经理
  • 职位
  • └ union_id
  • String
  • 可选
  • unionid001
  • unionid
  • └ job_number
  • String
  • 可选
  • GH123456
  • 工号
  • └ avatar
  • String
  • 必须
  • https://www.xxx.com/xxx.jpg
  • 头像url
  • └ name
  • String
  • 必须
  • 张三
  • 昵称
  • └ id
  • Number
  • 必须
  • 1
  • 用户Id
  • └ corp_id
  • String
  • 必须
  • ding123abc
  • 钉钉组织Id
  • └ dept_id_list
  • Number []
  • 可选
  • [1,2]
  • 用户所属部门Id列表

响应参数

名称 类型 示例值 描述
data Boolean true 更新是否成功,true是,false否
has_error Boolean false 请求是否失败,false否,true是
msg_info String demo msgInfo
msg_code String demo msgCode

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaDcUcUserUpdateRequest req = new AlibabaDcUcUserUpdateRequest();
AlibabaDcUcUserUpdateRequest.UpdateUserByIdReq obj1 = new AlibabaDcUcUserUpdateRequest.UpdateUserByIdReq();
obj1.setTitle("经理");
obj1.setUnionId("unionid001");
obj1.setJobNumber("GH123456");
obj1.setAvatar("https://www.xxx.com/xxx.jpg");
obj1.setName("张三");
obj1.setId(1L);
obj1.setCorpId("ding123abc");
obj1.setDeptIdList(new Long[] { 1,2 };
);
req.setReq(obj1);
AlibabaDcUcUserUpdateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_dc_uc_user_update_response>
    <data>true</data>
    <has_error>false</has_error>
    <msg_info>demo</msg_info>
    <msg_code>demo</msg_code>
</alibaba_dc_uc_user_update_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部