<?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 can't download my files with PHP Core API in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210610#M10519</link>
    <description>To revoke an app, click the 'x' at the far right of the app's row.</description>
    <pubDate>Wed, 08 Mar 2017 21:37:40 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2017-03-08T21:37:40Z</dc:date>
    <item>
      <title>I can't download my files with PHP Core API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210593#M10514</link>
      <description>&lt;P&gt;I have a Dropbox basic account, and these are my download codes. But I cant download my files with core API. Please help me .&lt;/P&gt;
&lt;PRE&gt;require_once "lib/Dropbox/autoload.php";
use \Dropbox as dbx;
$appInfo = dbx\AppInfo::loadFromJsonFile("app-info.json");
$webAuth = new dbx\WebAuthNoRedirect($appInfo, "PHP-Example/1.0");

$authorizeUrl = $webAuth-&amp;gt;start();

$accessToken = '&amp;lt;ACCESS_TOKEN&amp;gt;';

$dbxClient = new dbx\Client($accessToken, "PHP-Example/1.0");

$f = fopen("2016-2017-bahar-donemi-bilgisayar-muhendisligi-ders-programi.xls", "w+b");
$fileMetadata = $dbxClient-&amp;gt;getFile("/2016-2017-bahar-donemi-bilgisayar-muhendisligi-ders-programi.xls", $f);
fclose($f);&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 May 2019 09:25:02 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210593#M10514</guid>
      <dc:creator>Burak_Cayir</dc:creator>
      <dc:date>2019-05-29T09:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: I can't download my files with PHP Core API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210595#M10515</link>
      <description>I redacted your access token from your post, but you should revoke it now since it was publicly posted. You can do so by revoking access to the app entirely, if the access token is for your account, here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.dropbox.com/account/security" target="_blank"&gt;https://www.dropbox.com/account/security&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Or, you can disable just this access token using the API:&lt;BR /&gt;&lt;BR /&gt;v1: &lt;A href="https://www.dropbox.com/developers/core/docs#disable-token" target="_blank"&gt;https://www.dropbox.com/developers/core/docs#disable-token&lt;/A&gt;&lt;BR /&gt;v1 PHP SDK: &lt;A href="https://dropbox.github.io/dropbox-sdk-php/api-docs/v1.1.x/class-Dropbox.Client.html#_disableAccessToken" target="_blank"&gt;https://dropbox.github.io/dropbox-sdk-php/api-docs/v1.1.x/class-Dropbox.Client.html#_disableAccessToken&lt;/A&gt;&lt;BR /&gt;v2: &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#auth-token-revoke" target="_blank"&gt;https://www.dropbox.com/developers/documentation/http/documentation#auth-token-revoke&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, note that the SDK you're using uses API v1, which is deprecated:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://blogs.dropbox.com/developers/2016/06/api-v1-deprecated/" target="_blank"&gt;https://blogs.dropbox.com/developers/2016/06/api-v1-deprecated/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;You should switch to API v2 whenever possible. For PHP, you can either use a third party library:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.dropbox.com/developers/documentation/communitysdks" target="_blank"&gt;https://www.dropbox.com/developers/documentation/communitysdks&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Or use the HTTPS endpoints directly:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation" target="_blank"&gt;https://www.dropbox.com/developers/documentation/http/documentation&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If you run in to any issues, we're here to help. In that case, please post the error message you're getting (in addition to the code).&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 08 Mar 2017 20:28:32 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210595#M10515</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-03-08T20:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: I can't download my files with PHP Core API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210602#M10516</link>
      <description>Ok , I clicked that links but I cant find revoke option&lt;BR /&gt;&lt;A href="https://www.dropbox.com/account/security" target="_blank"&gt;https://www.dropbox.com/account/security&lt;/A&gt;</description>
      <pubDate>Wed, 08 Mar 2017 20:59:00 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210602#M10516</guid>
      <dc:creator>Burak_Cayir</dc:creator>
      <dc:date>2017-03-08T20:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: I can't download my files with PHP Core API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210610#M10519</link>
      <description>To revoke an app, click the 'x' at the far right of the app's row.</description>
      <pubDate>Wed, 08 Mar 2017 21:37:40 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210610#M10519</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-03-08T21:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: I can't download my files with PHP Core API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210613#M10521</link>
      <description>Ok , I revoked API. When I continue with my codes , I get this error.&lt;BR /&gt;&lt;BR /&gt;Fatal error: Uncaught InvalidArgumentException: 'accessToken' invalid: contains invalid character in C:\xampp\htdocs\17subat\lib\Dropbox\Client.php:1473 Stack trace: #0 C:\xampp\htdocs\17subat\lib\Dropbox\Client.php(78): Dropbox\Client::checkAccessTokenArg('accessToken', '&amp;lt;ACCESS_TOKEN&amp;gt;') #1 C:\xampp\htdocs\17subat\indirme.php(118): Dropbox\Client-&amp;gt;__construct('&amp;lt;ACCESS_TOKEN&amp;gt;', 'PHP-Example/1.0') #2 {main} thrown in C:\xampp\htdocs\17subat\lib\Dropbox\Client.php on line 1473</description>
      <pubDate>Wed, 08 Mar 2017 21:43:13 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210613#M10521</guid>
      <dc:creator>Burak_Cayir</dc:creator>
      <dc:date>2017-03-08T21:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: I can't download my files with PHP Core API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210648#M10530</link>
      <description>Are you running the version with "&amp;lt;ACCESS_TOKEN&amp;gt;", or did you just redact your access token like that for posting the error here?&lt;BR /&gt;&lt;BR /&gt;That's not a valid access token, and since you revoked the app, you'll need to retrieve a new access token to run your code. Make sure you use your access token exactly as provided, that is, just the long string without &amp;lt; or &amp;gt;.</description>
      <pubDate>Wed, 08 Mar 2017 22:36:59 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210648#M10530</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-03-08T22:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: I can't download my files with PHP Core API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210649#M10531</link>
      <description>What is the difference between new and old access tokens ? Why I should take a new one ? Old token perfectly uploaded my files but didnt download any file . I should try new access token ? Please let me know can all users upload files and download files with my Dropbox basic account ? I respect your business but I am going to crazy . I think I will delete my dropbox account &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@B0F70D28791EB05FA3EA0C3BDDF08EE3/emoticons/1f61e.png" alt=":disappointed_face:" title=":disappointed_face:" /&gt;</description>
      <pubDate>Wed, 08 Mar 2017 22:48:03 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210649#M10531</guid>
      <dc:creator>Burak_Cayir</dc:creator>
      <dc:date>2017-03-08T22:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: I can't download my files with PHP Core API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210657#M10534</link>
      <description>By new access token, I mean you should retrieve another. This won't be any different that the old one, except that the old one is now revoked.&lt;BR /&gt;&lt;BR /&gt;It is important that the old one was revoked because you posted it publicly, meaning any person could have taken it and accessed your account.&lt;BR /&gt;&lt;BR /&gt;Once you have a working access token again, let us know the error message you get when you try to download a file. (Just don't post the new access token itself.)</description>
      <pubDate>Wed, 08 Mar 2017 23:34:12 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210657#M10534</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-03-08T23:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: I can't download my files with PHP Core API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210677#M10538</link>
      <description>&lt;P&gt;Ok , I got a new token and I can use it. I can upload any file or I can list my dropbox files. But I cant download my files. I am adding codes again without access token.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;require_once "lib/Dropbox/autoload.php";
use \Dropbox as dbx;
$appInfo = dbx\AppInfo::loadFromJsonFile("app-info.json");
$webAuth = new dbx\WebAuthNoRedirect($appInfo, "PHP-Example/1.0");

$authorizeUrl = $webAuth-&amp;gt;start();

$accessToken = '&amp;lt;ACCESS_TOKEN&amp;gt;'; //secret

$dbxClient = new dbx\Client($accessToken, "PHP-Example/1.0");

$f = fopen("tufek.jpg", "w+b");
$fileMetadata = $dbxClient-&amp;gt;getFile("/tufek.jpg", $f); /*I cant download*/
fclose($f);
print_r($fileMetadata);

$metaData = $dbxClient-&amp;gt;getMetadataWithChildren("/");

foreach($metaData['contents'] as $file){ // I can list my files
    $f = str_replace("/", "", $file['path']);
    echo "&amp;lt;div style='text-align:center; margin-top:25px;'&amp;gt;&amp;lt;li&amp;gt;$f&amp;lt;/li&amp;gt;&amp;lt;/div&amp;gt;";
}&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Mar 2017 07:40:28 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210677#M10538</guid>
      <dc:creator>Burak_Cayir</dc:creator>
      <dc:date>2017-03-09T07:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: I can't download my files with PHP Core API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210679#M10539</link>
      <description>note : I dont see any error . Just reloading page  , I can see my files like a list and no more. I expect download tufek.jpg but no , its not download.</description>
      <pubDate>Thu, 09 Mar 2017 07:44:48 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210679#M10539</guid>
      <dc:creator>Burak_Cayir</dc:creator>
      <dc:date>2017-03-09T07:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: I can't download my files with PHP Core API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210681#M10540</link>
      <description>and I can see tüfek.jpg details with an array.</description>
      <pubDate>Thu, 09 Mar 2017 07:46:04 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210681#M10540</guid>
      <dc:creator>Burak_Cayir</dc:creator>
      <dc:date>2017-03-09T07:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: I can't download my files with PHP Core API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210781#M10551</link>
      <description>&lt;P&gt;[Cross-linking for reference:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/42690512/download-file-not-working-with-dropbox-api" target="_blank"&gt;https://stackoverflow.com/questions/42690512/download-file-not-working-with-dropbox-api&lt;/A&gt; ]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for following up with the additional information. If you're seeing the file metadata as you describe, that means the API call itself worked.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When using that &lt;A href="https://dropbox.github.io/dropbox-sdk-php/api-docs/v1.1.x/class-Dropbox.Client.html#_getFile" target="_self"&gt;getFile&lt;/A&gt;&amp;nbsp;method like this, &amp;nbsp;the file data is saved to the file object supplied by to the&amp;nbsp;resource $outStream parameter. In your case, that's your $f file object.&amp;nbsp;Once that method completes successfully, you can then read the data from that file, which in your case is at the path&amp;nbsp;"tufek.jpg".&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2017 18:05:55 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-can-t-download-my-files-with-PHP-Core-API/m-p/210781#M10551</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-03-09T18:05:55Z</dc:date>
    </item>
  </channel>
</rss>

