Вопрос

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