问题描述
我正在为GoogleApps编写用于管理用户和组的Java客户端。我之前从事过供应api,现在已被弃用。从信息中,需要使用Admin Sdk的目录API。我去了给出的链接,但我无法找到任何示例客户端开始工作目录API。请引导我获取信息或样本客户端开始
谢谢
你说得对。没有(Admin SDK)目录API示例要遵循()如果我是你,我会遵循(我想这是您需要使用的)
然后,您可以了解可以查看其他示例,然后按照
编辑:
用户密码重置示例:
User user = service.users()。get(username +'@'+ domainName).execute();
user.setHashFunction(SHA-1);
user.setPassword(DigestUtils.sha1Hex(newPassword));
service.users()。update(username +'@'+ domainName,user).execute();
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
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();
这篇关于GoogleApps的Java客户端信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!