<?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 From Where I can get the File ID in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/From-Where-I-can-get-the-File-ID/m-p/255267#M14761</link>
    <description>&lt;P&gt;I am trying to download a file using rest service using V2 API.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;curl -X POST https://api.dropboxapi.com/2/file_requests/get \
    --header "Authorization: Bearer &amp;lt;Access Token&amp;gt;" \
    --header "Content-Type: application/json" \
    --data "{\"id\": \"oaCAVmEyrqYnkZX9955Y\"}"&lt;/PRE&gt;&lt;P&gt;Where I can get the file id?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 09:16:54 GMT</pubDate>
    <dc:creator>rajas</dc:creator>
    <dc:date>2019-05-29T09:16:54Z</dc:date>
    <item>
      <title>From Where I can get the File ID</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/From-Where-I-can-get-the-File-ID/m-p/255267#M14761</link>
      <description>&lt;P&gt;I am trying to download a file using rest service using V2 API.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;curl -X POST https://api.dropboxapi.com/2/file_requests/get \
    --header "Authorization: Bearer &amp;lt;Access Token&amp;gt;" \
    --header "Content-Type: application/json" \
    --data "{\"id\": \"oaCAVmEyrqYnkZX9955Y\"}"&lt;/PRE&gt;&lt;P&gt;Where I can get the file id?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:16:54 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/From-Where-I-can-get-the-File-ID/m-p/255267#M14761</guid>
      <dc:creator>rajas</dc:creator>
      <dc:date>2019-05-29T09:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: From Where I can get the File ID</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/From-Where-I-can-get-the-File-ID/m-p/255276#M14764</link>
      <description>&lt;P&gt;You can get the ID for a file or folder from the Metadata object for the file or folder, e.g., as returned by&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-get_metadata" target="_blank"&gt;/2/files/get_metadata&lt;/A&gt; or&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder" target="_blank"&gt;/2/files/list_folder&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to download a file though, you should use &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-download" target="_self"&gt;/2/files/download&lt;/A&gt;&amp;nbsp;(not &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#file_requests-get" target="_self"&gt;/2/file_requests/get&lt;/A&gt;).&amp;nbsp;For&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-download" target="_self"&gt;/2/files/download&lt;/A&gt;&amp;nbsp;you can supply either the path or ID of the file you want to download. (The&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#file_requests-get" target="_self"&gt;/2/file_requests/get&lt;/A&gt;&amp;nbsp;endpoint is for getting the information about &lt;A href="https://www.dropbox.com/help/files-folders/create-file-request" target="_blank"&gt;a file request&lt;/A&gt;, not a file, by specifying the ID for &lt;A href="https://www.dropbox.com/help/files-folders/create-file-request" target="_blank"&gt;the file request&lt;/A&gt;.)&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2017 20:08:29 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/From-Where-I-can-get-the-File-ID/m-p/255276#M14764</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-12-04T20:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: From Where I can get the File ID</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/From-Where-I-can-get-the-File-ID/m-p/255891#M14817</link>
      <description>&lt;P&gt;Thanks Greg.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2017 16:59:10 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/From-Where-I-can-get-the-File-ID/m-p/255891#M14817</guid>
      <dc:creator>rajas</dc:creator>
      <dc:date>2017-12-08T16:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: From Where I can get the File ID</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/From-Where-I-can-get-the-File-ID/m-p/711461#M31524</link>
      <description>&lt;P&gt;Greg,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The documentation recommends using the File Id, because it is more reliable than the path which changes when the file is moved:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; 2. File id (e.g.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;id:odTlUvbpIEFAAAAAAAAGOQ&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - Unique file reference that persists if files are moved or renamed&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - Useful for apps referencing files that are moved around&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - Best choice for reliable, accurate reference to a&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;specific&lt;/I&gt;&lt;SPAN&gt;&amp;nbsp;file&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But you indicate the only way to get the id is to use the path name.&amp;nbsp; So programmatically, (I'm writing API calls to manage files/folders from our apps in Salesforce) I need to grab file ids, maybe as each file/folder is created, and store them locally (in Salesforce) so that in the future, I can always find the file?&amp;nbsp; Not sure how I'd index that store of ids.&amp;nbsp; I could use file name, if I could guarantee&amp;nbsp;every file name is unique across&amp;nbsp;our enterprise, which I can't.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Seems like I'm stuck with path names, and trying to train users to not mess with the folder structure.&amp;nbsp; Am I missing something?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2023 21:59:36 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/From-Where-I-can-get-the-File-ID/m-p/711461#M31524</guid>
      <dc:creator>bob-locascio</dc:creator>
      <dc:date>2023-09-04T21:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: From Where I can get the File ID</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/From-Where-I-can-get-the-File-ID/m-p/711628#M31526</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1740860"&gt;@bob-locascio&lt;/a&gt; For reference, while you can get the file ID for a file using its path, that's not the &lt;EM&gt;only&lt;/EM&gt; way to do so. You can get the file ID for a file from any FileMetadata object for the file; FileMetadata objects are used in a number of places on the Dropbox API. For example, you can use &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder" target="_blank" rel="noopener noreferrer"&gt;/2/files/list_folder&lt;/A&gt;[&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-continue" target="_blank"&gt;/continue&lt;/A&gt;] to list the contents of a folder, such as by supplying the folder's path or ID, or empty string "" for root, and get the file IDs for files in that folder from the returned FileMetadata objects. (If you're interested, you can see &lt;A href="https://github.com/search?q=repo%3Adropbox%2Fdropbox-api-spec%20FileMetadata&amp;amp;type=code" target="_self"&gt;all of the places where FileMetadata is used in the API specification&lt;/A&gt;.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, I don't know exactly what constraints and requirements you have in your own environment, but in Dropbox itself, note that in an account multiple files can have the same file &lt;EM&gt;name &lt;/EM&gt;(that is, different files in different folders can have the same name), but multiple files can't have the same file &lt;EM&gt;path&lt;/EM&gt; (that is, different files in the same folder can't have the same name). Dropbox file IDs are unique across all of Dropbox.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Exactly how you store any such metadata on your side is up to you, depending on what you need your app to do and how, so I can't really offer specific guidance on how you should structure that.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 15:25:18 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/From-Where-I-can-get-the-File-ID/m-p/711628#M31526</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-09-05T15:25:18Z</dc:date>
    </item>
  </channel>
</rss>

