Skip to main content

Hello community!


I'm using copy file endpoint to copy files into my box, but it seems that i can only copy files owned by me, and i need to copy a file from another account but that is publicly shared. (https://app.box.com/s/9zse1nmfvr9sdynmmn6nx7x6h9grkr5h)


Is there any way to copy a file that's not owned by me? The only woraround i found is asking the owner of the file to manually add me as file viewer (so i have it's scope) but i can't have that manual step in my app.


Thank you in advance!


Tom

I'm not sure what auth type or sdk you are using, but it sounds like you will want to use as-user calls to impersonate the owner of the files. Here are instructions on how to do that with Oauth and JWT


Hope this helps, 


Alex, Box Developer Advocate


Hi Alex!


I'm using cURL requests to do this, thank you for your response, but sadly this doesn't fit my needs,



"as-header needs the user to be a user with admin permissions, meaning either an admin, co-admin, or service account.",



I would need to copy a public file from another box without permissions (the permission is in fact the file being public).


For example, in Google Drive, a user can copy a public shared file to it's Drive since the file is public, i think this cannot be done in Box without giving at least "Viewer" permission to the user


 


Thank you in advance! 


Reply