Getting 404 for folder id obtained by calling the get_shared_item() method
Hi,
I cannot seem to access files from a shared box link using the box python sdk. The shared link can be viewed by anyone from a browser and the files available there can also be downloaded. The link has an expiry date as well.
Here's the code I used to authenticate (I'm using JWT and my app has been authorized by the enterprise admin):
sdk = JWTAuth.from_settings_file('config.json')
client = Client(sdk)
user = client.user(user_id=user_id).get()
And here's the code I'm using to get the shared item:
shared = client.as_user(user).get_shared_item('https://app.box.com/s/......')
items = client.folder(folder_id=shared.id).get()
Getting 'shared.type' correctly shows that it is a folder, and 'shared.id' returns a folder id. But upon calling get() with that folder id I keep getting 404. Adding or removing the as_user(user) method did not help.
Could you please let me know what I'm doing wrong here ASAP?
Thanks!
Please sign in to leave a comment.
Comments
0 comments