How to upload file by specify user
Hello
I am use JWT app, and there are some Enterprise Users. I want to upload some file by the API, and want to specify the user (Our app lined hte user to Box user). But seems I can only use the API user to upload the file. I tried to user asUser, but it return error code 403. The Enterprise user don't have permissions to access API.
Are there any wasy to setup the Enterprise user permission? Or specify the user when upload file(or upload new version)
Thanks,
Mike
-
Hi you can use As-User or a User Access Token. See:
https://developer.box.com/guides/authentication/jwt/as-user/
https://developer.box.com/guides/authentication/jwt/user-access-tokens/
In both cases you need to set the app to have the right permissions, and then get your admin to re-authorize.
-
Hi
Thanks for the guides, it is working fine for ht Admin user. But we cannot setup all users as admin. So are there any way to manage the general user?
The situation for us are:Our Application intergarte with Box, user can access Box files on our app, and user also login to Box and access the file. So if user update the file on our app, the file history always show the API user (serivce account) updated the file. We want it show the real user show updated it(our app user alwasy linked with box user, the user update file in our app also can login to Box).
Thanks,Mike
サインインしてコメントを残してください。
コメント
3件のコメント