GoogleApps java client information

蹲街弑〆低调 提交于 2019-12-23 02:59:14

问题


I am in a way of writing the java client on GoogleApps for managing the users and groups.I previously worked on the provisioning api and which is now deprecated. As from the info, Admin Sdk's directory api need to be used. I went to the links that were given but i couldnt find any sample client to start working on the directory api. Please guide me on to get the info or a sample client to start with

Thanks


回答1:


You are right. There is no (Admin SDK) Directory API sample to follow (list of API samples)

If I were you I'd follow the Service Account sample code (I guess that it's what you need to use)

Then you can learn how the client library works looking at the other samples and use it following the Directory API reference

EDIT:

Example of user password reset:

User user = service.users().get(username + '@' + domainName).execute();
user.setHashFunction("SHA-1");
user.setPassword(DigestUtils.sha1Hex(newPassword));
service.users().update(username + '@' + domainName, user).execute();


来源:https://stackoverflow.com/questions/21597550/googleapps-java-client-information

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!