Start 2025 on time and up to date. Seamlessly integrate your calendars into Dropbox with these simple steps.
Forum Discussion
Ratmil
2 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 work if the file is in a shared folder.
I can get the files list in the shared folder with endpoint "files/list_folder" and using the shared_link parameter.
So, how can I get metadata for a file in a shared folder?
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'.
- RatmilNew 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-DBDropbox Staff
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'.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,926 PostsLatest Activity: 3 days ago
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 or Facebook.
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!