<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: /2/files/get_metadata not returning all keys, e.g. sharing_info and parent_shared_folder_id in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/2-files-get-metadata-not-returning-all-keys-e-g-sharing-info-and/m-p/756513#M33104</link>
    <description>&lt;P&gt;Thanks! I wasn't aware of the share_folder endpoint.&lt;/P&gt;</description>
    <pubDate>Mon, 11 Mar 2024 20:03:32 GMT</pubDate>
    <dc:creator>agarrkoch</dc:creator>
    <dc:date>2024-03-11T20:03:32Z</dc:date>
    <item>
      <title>/2/files/get_metadata not returning all keys, e.g. sharing_info and parent_shared_folder_id</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/2-files-get-metadata-not-returning-all-keys-e-g-sharing-info-and/m-p/756461#M33101</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to use this endpoint to get the parent_shared_folder_id.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem is that my json data does not return this info.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get a response that looks like this:&lt;/P&gt;
&lt;P&gt;{'.tag': 'file', 'name': 'testy2.png', 'path_lower': '/test/testy2.png', 'path_display': '/test/testy2.png', 'id': 'id:AYyyfCw5MFkAAAAAAABqCQ', 'client_modified': '2024-03-08T18:02:38Z', 'server_modified': '2024-03-08T18:02:39Z', 'rev': '61329ff5f6a802ad8828f', 'size': 1054078, 'is_downloadable': True, 'has_explicit_shared_members': False, 'content_hash': '7ae9e640d9ba9f51f129f57b67fdf1e5a22bd94c69f825ec5442e81080a6dca9'}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm running this request in python.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;PRE&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;requests&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Define the endpoint URL&lt;BR /&gt;&lt;/SPAN&gt;url = &lt;SPAN&gt;"https://api.dropboxapi.com/2/files/get_metadata"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;# Replace '&amp;lt;get access token&amp;gt;' with your actual access token&lt;BR /&gt;&lt;/SPAN&gt;access_token = &lt;SPAN&gt;'ACCESS_TOKEN'&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;# Define the headers&lt;BR /&gt;&lt;/SPAN&gt;headers = {&lt;BR /&gt;    &lt;SPAN&gt;"Authorization"&lt;/SPAN&gt;: &lt;SPAN&gt;f"Bearer &lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;access_token&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;,&lt;BR /&gt;    &lt;SPAN&gt;"Content-Type"&lt;/SPAN&gt;: &lt;SPAN&gt;"application/json"&lt;BR /&gt;&lt;/SPAN&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Define the data payload&lt;BR /&gt;&lt;/SPAN&gt;data = {&lt;BR /&gt;    &lt;SPAN&gt;"include_deleted"&lt;/SPAN&gt;: &lt;SPAN&gt;True&lt;/SPAN&gt;,&lt;BR /&gt;    &lt;SPAN&gt;"include_has_explicit_shared_members"&lt;/SPAN&gt;: &lt;SPAN&gt;True&lt;/SPAN&gt;,&lt;BR /&gt;    &lt;SPAN&gt;"include_media_info"&lt;/SPAN&gt;: &lt;SPAN&gt;True&lt;/SPAN&gt;,&lt;BR /&gt;    &lt;SPAN&gt;"path"&lt;/SPAN&gt;: &lt;SPAN&gt;"/test/testy2.png"&lt;BR /&gt;&lt;/SPAN&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Make the POST request&lt;BR /&gt;&lt;/SPAN&gt;response = requests.post(url, &lt;SPAN&gt;headers&lt;/SPAN&gt;=headers, &lt;SPAN&gt;json&lt;/SPAN&gt;=data)&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Print the response&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;(response.json())&lt;/PRE&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 11 Mar 2024 17:43:29 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/2-files-get-metadata-not-returning-all-keys-e-g-sharing-info-and/m-p/756461#M33101</guid>
      <dc:creator>agarrkoch</dc:creator>
      <dc:date>2024-03-11T17:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: /2/files/get_metadata not returning all keys, e.g. sharing_info and parent_shared_folder_id</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/2-files-get-metadata-not-returning-all-keys-e-g-sharing-info-and/m-p/756487#M33102</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I'm seeing the problem. You only get a shared_folder_id returned to you if at least one person has been shared the folder.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to get the shared_folder_id so I can add members to a folder (per API specifications, I need to pass this id). The problem is that if I have no preexisting members for a folder, then I can't get the shared_folder_id. So I'm in a chicken-or-the-egg situation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I work around this??&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2024 18:49:42 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/2-files-get-metadata-not-returning-all-keys-e-g-sharing-info-and/m-p/756487#M33102</guid>
      <dc:creator>agarrkoch</dc:creator>
      <dc:date>2024-03-11T18:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: /2/files/get_metadata not returning all keys, e.g. sharing_info and parent_shared_folder_id</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/2-files-get-metadata-not-returning-all-keys-e-g-sharing-info-and/m-p/756490#M33103</link>
      <description>&lt;P&gt;The sharing_info field, e.g., &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-get_metadata" target="_blank" rel="noopener"&gt;from /2/files/get_metadata&lt;/A&gt;, is optional and only returned, "if this file is contained in a shared folder".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To turn a folder into a shared folder, so that you can then retrieve the shared folder ID like that and/or add members to it, you would use &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#sharing-share_folder" target="_blank" rel="noopener"&gt;the /2/sharing/share_folder endpoint&lt;/A&gt; (or &lt;A href="https://help.dropbox.com/share/share-with-others" target="_blank"&gt;share the folder manually via the Dropbox web site&lt;/A&gt;).&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2024 19:11:00 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/2-files-get-metadata-not-returning-all-keys-e-g-sharing-info-and/m-p/756490#M33103</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2024-03-11T19:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: /2/files/get_metadata not returning all keys, e.g. sharing_info and parent_shared_folder_id</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/2-files-get-metadata-not-returning-all-keys-e-g-sharing-info-and/m-p/756513#M33104</link>
      <description>&lt;P&gt;Thanks! I wasn't aware of the share_folder endpoint.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2024 20:03:32 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/2-files-get-metadata-not-returning-all-keys-e-g-sharing-info-and/m-p/756513#M33104</guid>
      <dc:creator>agarrkoch</dc:creator>
      <dc:date>2024-03-11T20:03:32Z</dc:date>
    </item>
  </channel>
</rss>

