Sharing box app as collaborator to folder回答済み
Hi Team ,
I have created a new box app using box developer console name like TestAPP . I have created a test folder like 'TestFolder' using box UI. I would like to add app as a collaborator to this test folder.
I tried share option with collaboration by could not find any email associated wiht box app.
can you please provide some more details on how can I add my app as collaborator to test folder
Hi, great question. It's technically possible to invite the "app" (specifically, the Service Account) as a collaborator into one of your test folder from the main Box UI, but doing it this way can be confusing if you're just getting started.
To confirm, are you using the JWT Auth method for authentication? If so, then I recommend creating a folder with your app instead, and then inviting your normal user (the user you log into on the UI) as a collaborator.
Here are some examples from the Box Node SDK:
Starting out this way means that your app will own all the content in the folder, and avoids any headaches with permissions in the future when trying to do more complex actions.
Thanks for this updates . We are using app config file to authenticate
with box . However the issue is that one of the folder was already created
earlier and it’s contains a useful information and now we want to handle
that folder with app(using service account ) .
That’s why we would like to add app as a collaborator so we can handle
folder using app .
Aha, I see what you mean. In that case, the way you'd proceed would be in two main steps:
* Obtain the service account's user ID or login
* Invite the service account as a collaborator
For the first step, you can do this by making an API call to return the current user:
- https://github.com/box/box-node-sdk/blob/master/docs/users.md#get-the-current-users-information (Node SDK example)
For the second step, you can either do it in the UI using the "login" field returned by the API, or you can make an API call to invite the service account as a collaborator. If you want to use an API call, you would need to use a token for your box account (and not the service account).