<?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: I want to obtain the URL of a file on Dropbox via an API. in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-want-to-obtain-the-URL-of-a-file-on-Dropbox-via-an-API/m-p/696135#M31127</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1719941"&gt;@Babaraba Abdabi&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;...&lt;BR /&gt;"&lt;A href="https://www.dropbox.com/home#{dirname}?preview=#{basename" target="_blank" rel="noopener"&gt;https://www.dropbox.com/home#{dirname}?preview=#{basename&lt;/A&gt;}"&lt;BR /&gt;...&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1719941"&gt;@Babaraba Abdabi&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Such a link may appear valid for file, but take in mind that it's very context specific (login session specific). You should make sure the user has logged in the same context where you got your dirname/basename from. Otherwise the link could appear invalid or even worse - link may be valid but pointing something completely different (something that's difficult to trace).&lt;/P&gt;&lt;P&gt;You may got confused from Greg's proposal for usage of &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#sharing-create_shared_link_with_settings" target="_self" rel="noopener noreferrer"&gt;/2/sharing/create_shared_link_with_settings&lt;/A&gt;. In spite part of 'sharing' family of calls, while set 'no_one' as audience, this link appear absolutely equivalent to the your proposal, except it doesn't depend on the context (i.e. much more stable and not shared one in fact - despite of the 'family' - you're sharing to 'no_one'). &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt;&lt;/P&gt;&lt;P&gt;Hope this clarifies matter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add: Something else you may be interested in. Instead of creating new link, you can get a link every file has already. Just call &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#sharing-get_file_metadata" target="_blank" rel="noopener"&gt;/2/sharing/get_file_metadata&lt;/A&gt; to a file of interest (either shared or not). In the result's filed 'preview_url' you will receive preexisting link of type 'no_one'.&lt;/P&gt;</description>
    <pubDate>Mon, 03 Jul 2023 14:39:04 GMT</pubDate>
    <dc:creator>Здравко</dc:creator>
    <dc:date>2023-07-03T14:39:04Z</dc:date>
    <item>
      <title>I want to obtain the URL of a file on Dropbox via an API.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-want-to-obtain-the-URL-of-a-file-on-Dropbox-via-an-API/m-p/695554#M31113</link>
      <description>&lt;P&gt;I want to get the URL of the file for users with the appropriate access permissions to the file. This is not about the shared link URL.&lt;/P&gt;&lt;P&gt;Is there an API to get the URL of a file on Dropbox? Or is there a way to construct the URL of a file on Dropbox?&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2023 09:32:00 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-want-to-obtain-the-URL-of-a-file-on-Dropbox-via-an-API/m-p/695554#M31113</guid>
      <dc:creator>Babaraba Abdabi</dc:creator>
      <dc:date>2023-06-30T09:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: I want to obtain the URL of a file on Dropbox via an API.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-want-to-obtain-the-URL-of-a-file-on-Dropbox-via-an-API/m-p/695648#M31115</link>
      <description>&lt;P&gt;The Dropbox API doesn't offer a way to get/construct the URL of a file on the Dropbox web site (like with "/home") exactly, but you can call &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#sharing-create_shared_link_with_settings" target="_self" rel="noopener noreferrer"&gt;/2/sharing/create_shared_link_with_settings&lt;/A&gt; with the 'path' set to the the file/folder, and 'settings.audience' to 'no_one' to get a shared link that would refer to the folder on the web site for anyone who has access to it, though not directly enable any additional access to it.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2023 14:34:16 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-want-to-obtain-the-URL-of-a-file-on-Dropbox-via-an-API/m-p/695648#M31115</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-06-30T14:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: I want to obtain the URL of a file on Dropbox via an API.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-want-to-obtain-the-URL-of-a-file-on-Dropbox-via-an-API/m-p/696069#M31125</link>
      <description>&lt;P&gt;Thank you for your reply.&lt;BR /&gt;I understand that there is no API to obtain the URL for direct access (not sharing url).&lt;/P&gt;&lt;P&gt;In that case, I am considering a way to construct a link URL from the file path. Can I assume that all can be accessed from under `/home/` ?&lt;/P&gt;&lt;P&gt;example)&lt;BR /&gt;```&lt;BR /&gt;lower_path = "/foo/bar/baz/something.pdf"&lt;BR /&gt;dirname = File.dirname(lowerpath) # /foo/bar/baz&lt;BR /&gt;basename = File.basename(lowerpath) # something.pdf&lt;BR /&gt;"&lt;A href="https://www.dropbox.com/home#{dirname}?preview=#{basename" target="_blank"&gt;https://www.dropbox.com/home#{dirname}?preview=#{basename&lt;/A&gt;}"&lt;BR /&gt;```&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2023 09:29:45 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-want-to-obtain-the-URL-of-a-file-on-Dropbox-via-an-API/m-p/696069#M31125</guid>
      <dc:creator>Babaraba Abdabi</dc:creator>
      <dc:date>2023-07-03T09:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: I want to obtain the URL of a file on Dropbox via an API.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-want-to-obtain-the-URL-of-a-file-on-Dropbox-via-an-API/m-p/696135#M31127</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1719941"&gt;@Babaraba Abdabi&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;...&lt;BR /&gt;"&lt;A href="https://www.dropbox.com/home#{dirname}?preview=#{basename" target="_blank" rel="noopener"&gt;https://www.dropbox.com/home#{dirname}?preview=#{basename&lt;/A&gt;}"&lt;BR /&gt;...&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1719941"&gt;@Babaraba Abdabi&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Such a link may appear valid for file, but take in mind that it's very context specific (login session specific). You should make sure the user has logged in the same context where you got your dirname/basename from. Otherwise the link could appear invalid or even worse - link may be valid but pointing something completely different (something that's difficult to trace).&lt;/P&gt;&lt;P&gt;You may got confused from Greg's proposal for usage of &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#sharing-create_shared_link_with_settings" target="_self" rel="noopener noreferrer"&gt;/2/sharing/create_shared_link_with_settings&lt;/A&gt;. In spite part of 'sharing' family of calls, while set 'no_one' as audience, this link appear absolutely equivalent to the your proposal, except it doesn't depend on the context (i.e. much more stable and not shared one in fact - despite of the 'family' - you're sharing to 'no_one'). &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt;&lt;/P&gt;&lt;P&gt;Hope this clarifies matter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add: Something else you may be interested in. Instead of creating new link, you can get a link every file has already. Just call &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#sharing-get_file_metadata" target="_blank" rel="noopener"&gt;/2/sharing/get_file_metadata&lt;/A&gt; to a file of interest (either shared or not). In the result's filed 'preview_url' you will receive preexisting link of type 'no_one'.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2023 14:39:04 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-want-to-obtain-the-URL-of-a-file-on-Dropbox-via-an-API/m-p/696135#M31127</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-07-03T14:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: I want to obtain the URL of a file on Dropbox via an API.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-want-to-obtain-the-URL-of-a-file-on-Dropbox-via-an-API/m-p/696150#M31130</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1719941"&gt;@Babaraba Abdabi&lt;/a&gt; As Здравко mentioned, you shouldn't assume that a link constructed like that will be necessarily correct always. We don't officially support building links like that; I recommend trying out the 'no_one' shared link option that I mentioned and that Здравко reiterated, as it sounds like it would be useful for your scenario.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2023 13:17:12 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-want-to-obtain-the-URL-of-a-file-on-Dropbox-via-an-API/m-p/696150#M31130</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-07-03T13:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: I want to obtain the URL of a file on Dropbox via an API.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-want-to-obtain-the-URL-of-a-file-on-Dropbox-via-an-API/m-p/696340#M31133</link>
      <description>&lt;P&gt;Thank you for your replies.&lt;BR /&gt;I see, I understand that the case where constructing a URL is effective is extremely limited, and it is generally better to use the no_one sharing link.&lt;BR /&gt;My question has been resolved.&lt;BR /&gt;Thank you for your answers. These were really helpful.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 03:03:24 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-want-to-obtain-the-URL-of-a-file-on-Dropbox-via-an-API/m-p/696340#M31133</guid>
      <dc:creator>Babaraba Abdabi</dc:creator>
      <dc:date>2023-07-04T03:03:24Z</dc:date>
    </item>
  </channel>
</rss>

