In version 1.0 of the BOX.net API, there's a method to get a user's account information (http://developers.box.net/w/page/12923928/ApiFunction_get_account_info)

https://www.box.net/api/1.0/rest?action=get_account_info&api_key=<key>&auth_token=<token>

But in version 2.0, I can't find an equivalent method. Does it exist? Or is the old method still available in some form using the new 2.0 API?

有帮助吗?

解决方案

We currently have not yet implemented the /users endpoint which would provide the information you're looking for.

However, auth tokens will currently work across v1 and v2, so you can still call the v1 method.

其他提示

Try this.

BoxClient client = getAuthenticatedClient(code);
BoxDefaultRequestObject requestObject = null;
List<BoxUser> userList = client.getUsersManager().getAllEnterpriseUser(requestObject, null);
for (BoxUser usr : userList) {
    System.out.println("Addr: " + usr.getAddress());
    System.out.println("Name : " + usr.getName());
    System.out.println("Login : " + usr.getLogin());
}
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top