搜索部门时,报错:user access token is empty
代码如下:
public static DepartmentSearchResult searchDepartments(String query) throws Exception { ContactService contactService = new ContactService(config); DepartmentSearchReqBody searchReqBody = new DepartmentSearchReqBody(); searchReqBody.setQuery(query); Response<DepartmentSearchResult> response = contactService.getDepartments().search(searchReqBody).execute(); System.out.println(Jsons.DEFAULT_GSON.toJson(response)); if (response.getCode() == 0) { return response.getData(); } return null; }
已经执行过testAccessToken方法。
执行searchDepartments报错:user access token is empty
老SDK已经不维护了,欢迎加群使用新版SDK

链接失效了
链接失效了