<?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: Dropbox API for Python: Can't Create Shared Link (CreateSharedLinkError, malformed path) in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-for-Python-Can-t-Create-Shared-Link/m-p/325941#M19107</link>
    <description>&lt;P&gt;When you make a&amp;nbsp;Dropbox API call like this and supply a path, you should supply the path to the remote file on Dropbox, relative to the root of the&amp;nbsp;Dropbox account.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the code you shared here, you're instead sharing a path to the local file, which isn't a valid path for the Dropbox API.&lt;/P&gt;
&lt;P&gt;That is, based on the sample you shared, the path value should instead look like:&lt;/P&gt;
&lt;P&gt;"/DUNESBURY NEW ITEM PICS/2019/01 January/Originals/Flowers/DSC_0247.NEF"&lt;/P&gt;
&lt;P&gt;(You can get these values from elsewhere on the API, such as in&amp;nbsp;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/files.html#dropbox.files.Metadata.path_lower" target="_blank"&gt;Metadata.path_lower&lt;/A&gt;, e.g,. as returned by&amp;nbsp;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox.Dropbox.files_list_folder" target="_blank"&gt;files_list_folder&lt;/A&gt;.)&lt;/P&gt;</description>
    <pubDate>Tue, 29 Jan 2019 19:34:25 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2019-01-29T19:34:25Z</dc:date>
    <item>
      <title>Dropbox API for Python: Can't Create Shared Link (CreateSharedLinkError, malformed path)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-for-Python-Can-t-Create-Shared-Link/m-p/325926#M19104</link>
      <description>&lt;P class="s90z9tc-10 fHRkcP"&gt;I'm having trouble getting a shareable link from a file through the Dropbox API. This is the entirety of my code:&lt;/P&gt;&lt;PRE&gt;import os
import dropbox
dbx = dropbox.Dropbox('access token')
myPath = os.path.join("E:\\Dropbox\\DUNESBURY NEW ITEM PICS\\2019\\01 January\\Originals\\Flowers\\DSC_0247.NEF")&lt;BR /&gt;dbx.sharing_create_shared_link(path = myPath, short_url=False, pending_upload=None)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;This throws the error:&lt;/P&gt;&lt;PRE&gt;dropbox.exceptions.ApiError: ApiError('dd1d6711a935e6b6fd04c192fd58bfca', CreateSharedLinkError('path', LookupError('malformed_path', None)))&lt;/PRE&gt;&lt;P&gt;I'm trying to get this script to print links like this:&amp;nbsp;&lt;A href="https://www.dropbox.com/s/fcdljiu8hjv3g7u/DSC_0247.NEF?dl=0" target="_blank"&gt;https://www.dropbox.com/s/fcdljiu8hjv3g7u/DSC_0247.NEF?dl=0&lt;/A&gt;, and write them to a .txt file, so I can automate the process for us getting links out of Dropbox.&lt;/P&gt;&lt;P&gt;Am I on the right track? How can I resolve this error?&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:08:14 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-for-Python-Can-t-Create-Shared-Link/m-p/325926#M19104</guid>
      <dc:creator>Jim_Hagerty</dc:creator>
      <dc:date>2019-05-29T09:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: Dropbox API for Python: Can't Create Shared Link (CreateSharedLinkError, malformed path)</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-for-Python-Can-t-Create-Shared-Link/m-p/325941#M19107</link>
      <description>&lt;P&gt;When you make a&amp;nbsp;Dropbox API call like this and supply a path, you should supply the path to the remote file on Dropbox, relative to the root of the&amp;nbsp;Dropbox account.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the code you shared here, you're instead sharing a path to the local file, which isn't a valid path for the Dropbox API.&lt;/P&gt;
&lt;P&gt;That is, based on the sample you shared, the path value should instead look like:&lt;/P&gt;
&lt;P&gt;"/DUNESBURY NEW ITEM PICS/2019/01 January/Originals/Flowers/DSC_0247.NEF"&lt;/P&gt;
&lt;P&gt;(You can get these values from elsewhere on the API, such as in&amp;nbsp;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/files.html#dropbox.files.Metadata.path_lower" target="_blank"&gt;Metadata.path_lower&lt;/A&gt;, e.g,. as returned by&amp;nbsp;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox.Dropbox.files_list_folder" target="_blank"&gt;files_list_folder&lt;/A&gt;.)&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jan 2019 19:34:25 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-for-Python-Can-t-Create-Shared-Link/m-p/325941#M19107</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2019-01-29T19:34:25Z</dc:date>
    </item>
  </channel>
</rss>

