<?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: Python - what to type to get the shared link of a file? in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Python-what-to-type-to-get-the-shared-link-of-a-file/m-p/396199#M21769</link>
    <description>&lt;P&gt;The&amp;nbsp;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox.Dropbox.sharing_create_shared_link_with_settings" target="_self"&gt;sharing_create_shared_link_with_settings&lt;/A&gt; method will throw an exception if a shared link is already created for the specified path. You can catch that, and use&amp;nbsp;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/sharing.html#dropbox.sharing.CreateSharedLinkWithSettingsError.is_shared_link_already_exists" target="_self"&gt;CreateSharedLinkWithSettingsError.is_shared_link_already_exists&lt;/A&gt; to determine if that's the reason the call failed. If so, you can use&amp;nbsp;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/sharing.html#dropbox.sharing.CreateSharedLinkWithSettingsError.get_shared_link_already_exists" target="_self"&gt;CreateSharedLinkWithSettingsError.get_shared_link_already_exists&lt;/A&gt; to get the error value, which may include the metadata of the existing shared link.&lt;/P&gt;
&lt;P&gt;Alternatively, you can first call&amp;nbsp;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox.Dropbox.sharing_list_shared_links" target="_self"&gt;sharing_list_shared_links&lt;/A&gt; with the 'path' and 'direct_only=True' to check if a link already exists for the particular&amp;nbsp;path, and retrieve it if so.&lt;/P&gt;</description>
    <pubDate>Tue, 11 Feb 2020 16:37:02 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2020-02-11T16:37:02Z</dc:date>
    <item>
      <title>Python - what to type to get the shared link of a file?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Python-what-to-type-to-get-the-shared-link-of-a-file/m-p/396047#M21767</link>
      <description>&lt;P&gt;I need a little bit of python help.&amp;nbsp; I've learned how to create a shared link, but if a shared link is already created on that file, it errors out.&lt;/P&gt;
&lt;P&gt;shared_link_metadata = dbx.sharing_create_shared_link_with_settings("/temp/hehe.txt")&lt;BR /&gt;print (shared_link_metadata.url)&lt;BR /&gt;&lt;BR /&gt;How do I check if the link already exists and how do I check the link if one is already created?&amp;nbsp; Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 18:37:20 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Python-what-to-type-to-get-the-shared-link-of-a-file/m-p/396047#M21767</guid>
      <dc:creator>omahacircusarts</dc:creator>
      <dc:date>2020-02-11T18:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: Python - what to type to get the shared link of a file?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Python-what-to-type-to-get-the-shared-link-of-a-file/m-p/396199#M21769</link>
      <description>&lt;P&gt;The&amp;nbsp;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox.Dropbox.sharing_create_shared_link_with_settings" target="_self"&gt;sharing_create_shared_link_with_settings&lt;/A&gt; method will throw an exception if a shared link is already created for the specified path. You can catch that, and use&amp;nbsp;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/sharing.html#dropbox.sharing.CreateSharedLinkWithSettingsError.is_shared_link_already_exists" target="_self"&gt;CreateSharedLinkWithSettingsError.is_shared_link_already_exists&lt;/A&gt; to determine if that's the reason the call failed. If so, you can use&amp;nbsp;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/sharing.html#dropbox.sharing.CreateSharedLinkWithSettingsError.get_shared_link_already_exists" target="_self"&gt;CreateSharedLinkWithSettingsError.get_shared_link_already_exists&lt;/A&gt; to get the error value, which may include the metadata of the existing shared link.&lt;/P&gt;
&lt;P&gt;Alternatively, you can first call&amp;nbsp;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox.Dropbox.sharing_list_shared_links" target="_self"&gt;sharing_list_shared_links&lt;/A&gt; with the 'path' and 'direct_only=True' to check if a link already exists for the particular&amp;nbsp;path, and retrieve it if so.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 16:37:02 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Python-what-to-type-to-get-the-shared-link-of-a-file/m-p/396199#M21769</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-02-11T16:37:02Z</dc:date>
    </item>
  </channel>
</rss>

