Skip to main content

사용자 팀 설정

Swit User 팀 등록


  • Swit 의 Team API를 이용하여 등록한 유저들을 팀에 추가 합니다.
  • 소속된 팀이 없는 유저를 처음 추가하면 Main 부서로 등록되게 됩니다.

JSONObject params = new JSONObject();
JSONArray userList = new JSONArray();

for(String id : userIds)
    userList.add(id);

params.put("user_ids", userList);
params.put("id", teamId);

SwitTokenDto tokenDto = authService.getSwitTokenByDb("cts-api");
JsonObject result = httpUtils.post("team.user.add", params, tokenDto);