Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Ratmil
12 months agoNew member | Level 1
Get file metadata (video resolution and duration) from shared folder
Hi everybody, I need to access a file metadata using endpoint "files/get_metadata". I need to get video resolution and duration. My code works fine is the file is in my home folder, but it doesn't w...
- 12 months ago
It sounds like you're referring to using the /2/files/get_metadata endpoint and setting 'include_media_info' to true, in order to get the media information such as 'dimensions' and 'duration' returned in the 'media_info' field in the result.
That functionality is only available on /2/files/get_metadata, which does require that the file be present in the connected account. That means that it's not possible to retrieve that just using a shared link to content that doesn't exist in the connected account.
The /2/sharing/get_shared_link_metadata endpoint does return metadata about shared links, but it doesn't include 'media_info', so as you found you would need to actually add the content to the connected account and use /2/files/get_metadata to get 'media_info'.
Ratmil
12 months agoNew member | Level 1
OK, the thing is that shared folder is a public folder.
So, the workaround I found is asking the client to share the folder with me instead of making it public.
Anyway, does anyone know how the get the metadata is the folder is public?
Greg-DB
Dropbox Community Moderator
12 months agoIt sounds like you're referring to using the /2/files/get_metadata endpoint and setting 'include_media_info' to true, in order to get the media information such as 'dimensions' and 'duration' returned in the 'media_info' field in the result.
That functionality is only available on /2/files/get_metadata, which does require that the file be present in the connected account. That means that it's not possible to retrieve that just using a shared link to content that doesn't exist in the connected account.
The /2/sharing/get_shared_link_metadata endpoint does return metadata about shared links, but it doesn't include 'media_info', so as you found you would need to actually add the content to the connected account and use /2/files/get_metadata to get 'media_info'.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!