BoxFolder API createFolder

New post

Comments

2 comments

  • braden

    Hi  

     

    Thanks for coming to the Box Community Developer forums! It sounds like you're well on your way to making calls with your newly created app. 

     

    In order to access files and folders between your App User and your Managed User, your App User will either need to be collaborated on the folders you would like the App User to access, or you will need to enable the "Perform Actions as Users" feature in your Configuration page for your app. Once the As-User header is enabled, you'll be able to generate tokens for the user you want to perform the action, or you'll be able to pass the user's User ID in the header of the call to perform an upload as if you were the user themselves.

     

    Let me know if you have any further questions about these concepts, and thanks for reaching out to the Box Community!

    0
    Comment actions Permalink
  • svoruganti

    Great, Thanks for the reply.

     

    Just before seeing your reply, I did follow the same method as you suggested.

     

     

    Iterator users = (Iterator) BoxUser.getAllEnterpriseUsers(client).iterator();
    while (users.hasNext())
    {
    BoxUser.Info u = users.next();
    System.out.println(u.getID() + " " + u.getName() +" "+u.getLogin());
    }

    System.out.println("*************");

    BoxUser.Info currentUserInfo = BoxUser.getCurrentUser(client).getInfo();

    System.out.println("Current User "+ currentUserInfo.getID() + " " + currentUserInfo.getName());
    client.asUser(***phone number removed for privacy***");
    currentUserInfo = BoxUser.getCurrentUser(client).getInfo();

     

    The information you provided really helpful, I will revise my code accordingly. 

     

    Thank you,

    Srinivas.

    0
    Comment actions Permalink

Please sign in to leave a comment.