title: Unable to generate a share link via a script and Synology API
body: <p>I'm hitting a wall with the python script at <a href="https://stackoverflow.com/a/60946539/1641112">https://stackoverflow.com/a/60946539/1641112</a>. I've added the script to a file called <code>test.py3</code>.</p>
  
  <p>I'm running this command directly on my Synology drive with an admin account: <code>python test.py3 /volume2/dir/key-basic-preferred.pdf --debug</code></p>
  
  <p>The relevant part of the debug output:</p>
  
  <pre><code>Get(): "request = entry.cgi?api=SYNO.FileStation.Sharing&amp;version=3&amp;method=create&amp;path="/volume2/dir/key-basic-preferred.pdf""
  GET: "http://127.0.0.1:5000/webapi/entry.cgi?api=SYNO.FileStation.Sharing&amp;version=3&amp;method=create&amp;path="/volume2/dir/key-basic-preferred.pdf"&amp;_sid=011o6xaJaxvLsKCJ4N91278"
  GET: "&lt;Response [200]&gt;"
  ERROR: Get (entry.cgi?api=SYNO.FileStation.Sharing&amp;version=3&amp;method=create&amp;path="/volume2/dir/key-basic-preferred.pdf"&amp;_sid=011o6xaJaxvLsKCJ4N91278):
    Error: 408: Unknown error
  </code></pre>
  
  <p>The 408 error is an unknown file according to the <a href="https://global.download.synology.com/download/Document/Software/DeveloperGuide/Package/FileStation/All/enu/Synology_File_Station_API_Guide.pdf" rel="nofollow noreferrer">API docs</a>.</p>
  
  <p>However, I know that file exists. I've tried URL encoding the path. I've tried with and without quotes. I've tried noodling with the python code (don't know python) to change the quotations and api version to 1 instead of 3 but I'm not having any luck. </p>