<?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: To get Download able URl in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/To-get-Download-able-URl/m-p/368864#M20833</link>
    <description>&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1200002"&gt;@bhuwan&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;In your code shared link existence is expected! Right? What about if such link don't exist yet and is just created?! &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@86FF27E33EE6AE58E01795BD66324A7F/images/emoticons/1f914.png" alt=":thinking:" title=":thinking:" /&gt; &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@F55D1311E4D274BF094217A54A6087D3/images/emoticons/1f609.png" alt=":wink:" title=":wink:" /&gt;&lt;/P&gt;&lt;P&gt;Hope this gives some direction.&lt;/P&gt;</description>
    <pubDate>Thu, 03 Oct 2019 15:07:49 GMT</pubDate>
    <dc:creator>Здравко</dc:creator>
    <dc:date>2019-10-03T15:07:49Z</dc:date>
    <item>
      <title>To get Download able URl</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/To-get-Download-able-URl/m-p/368720#M20827</link>
      <description>&lt;P&gt;I have try to use the way I was told in my previous ticket.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;try&lt;/SPAN&gt;{&lt;BR /&gt;    &lt;SPAN&gt;$client&lt;/SPAN&gt;-&amp;gt;&lt;SPAN&gt;request&lt;/SPAN&gt;(&lt;SPAN&gt;'POST'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;config&lt;/SPAN&gt;(&lt;SPAN&gt;'providers.providers.dropbox.create_shared_link'&lt;/SPAN&gt;)&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;        [&lt;BR /&gt;            &lt;SPAN&gt;'headers'&lt;/SPAN&gt;=&amp;gt;&lt;BR /&gt;                [&lt;BR /&gt;                    &lt;SPAN&gt;'Authorization'&lt;/SPAN&gt;=&amp;gt;&lt;SPAN&gt;'Bearer '&lt;/SPAN&gt;.&lt;SPAN&gt;$acc_token&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;                    &lt;SPAN&gt;'Content-Type'  &lt;/SPAN&gt;=&amp;gt; &lt;SPAN&gt;'application/json'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;                ]&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;'body'&lt;/SPAN&gt;=&amp;gt;&lt;SPAN&gt;json_encode&lt;/SPAN&gt;(&lt;SPAN&gt;$parameters&lt;/SPAN&gt;)&lt;BR /&gt;        ])&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;}&lt;SPAN&gt;catch&lt;/SPAN&gt;(&lt;SPAN&gt;ClientException &lt;/SPAN&gt;&lt;SPAN&gt;$exception&lt;/SPAN&gt;){&lt;BR /&gt;    &lt;SPAN&gt;$url &lt;/SPAN&gt;= &lt;SPAN&gt;json_decode&lt;/SPAN&gt;(&lt;SPAN&gt;$exception&lt;/SPAN&gt;-&amp;gt;&lt;SPAN&gt;getResponse&lt;/SPAN&gt;()-&amp;gt;&lt;SPAN&gt;getBody&lt;/SPAN&gt;()&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;)[&lt;SPAN&gt;'error'&lt;/SPAN&gt;][&lt;SPAN&gt;'shared_link_already_exists'&lt;/SPAN&gt;][&lt;SPAN&gt;'metadata'&lt;/SPAN&gt;][&lt;SPAN&gt;'url'&lt;/SPAN&gt;]&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;$url &lt;/SPAN&gt;= &lt;SPAN&gt;str_replace&lt;/SPAN&gt;(&lt;SPAN&gt;'dl=0'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'dl=1'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;$url&lt;/SPAN&gt;)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;return &lt;/SPAN&gt;&lt;SPAN&gt;$url&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;However, sometime endpoint is not responding anything either in call or exception. Need to solve this issue.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2019 03:06:30 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/To-get-Download-able-URl/m-p/368720#M20827</guid>
      <dc:creator>bhuwan</dc:creator>
      <dc:date>2019-10-03T03:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: To get Download able URl</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/To-get-Download-able-URl/m-p/368862#M20832</link>
      <description>&lt;P&gt;Looking at your code, a few things come to mind:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;You're always calling `json_decode` in the exception handler, assuming the error response is always JSON, but this isn't necessarily&amp;nbsp;true. (It can be plain text, for instance.) You should first check the response's Content-Type header value to determine the type of the response.&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;You're only catching `ClientException`, however there might be other kinds of exceptions. (I can't provide support for the client you're using though, so I can't say for sure.)&lt;/LI&gt;
&lt;LI&gt;You may be running in to an issue with your network connection. Is there any firewall, proxy, anit-virus, etc. on your network connection that may be interfering?&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;In any case, I&amp;nbsp;recommend stepping through with a debugger to see exactly where code execution is going. If you're getting any unexpected error or output from the&amp;nbsp;Dropbox API itself, share it here so we can look into it.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2019 14:55:45 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/To-get-Download-able-URl/m-p/368862#M20832</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2019-10-03T14:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: To get Download able URl</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/To-get-Download-able-URl/m-p/368864#M20833</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1200002"&gt;@bhuwan&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;In your code shared link existence is expected! Right? What about if such link don't exist yet and is just created?! &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@86FF27E33EE6AE58E01795BD66324A7F/images/emoticons/1f914.png" alt=":thinking:" title=":thinking:" /&gt; &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@F55D1311E4D274BF094217A54A6087D3/images/emoticons/1f609.png" alt=":wink:" title=":wink:" /&gt;&lt;/P&gt;&lt;P&gt;Hope this gives some direction.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2019 15:07:49 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/To-get-Download-able-URl/m-p/368864#M20833</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2019-10-03T15:07:49Z</dc:date>
    </item>
  </channel>
</rss>

