<?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: Cron job to upload files from server to Dropbox in Discuss Dropbox Developer &amp; API</title>
    <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Cron-job-to-upload-files-from-server-to-Dropbox/m-p/382248#M886</link>
    <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1238222"&gt;@caseyprovost&lt;/a&gt;&amp;nbsp;In order to upload to&amp;nbsp;Dropbox via the&amp;nbsp;Dropbox API, you need to upload to some particular user account. If you don't need to connect to arbitrary end-user accounts, and are just connecting to your own account, for instance, you don't need to build the app authorization flow and UI. You can just get your own access token once and use that.&lt;/P&gt;</description>
    <pubDate>Wed, 04 Dec 2019 16:51:06 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2019-12-04T16:51:06Z</dc:date>
    <item>
      <title>Cron job to upload files from server to Dropbox</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Cron-job-to-upload-files-from-server-to-Dropbox/m-p/381215#M873</link>
      <description>&lt;P&gt;I've been able to create a PHP app that allows me to upload files through the API into dropbox. &amp;nbsp;It works great; however, the problem is, the first time you access it, you have to authenticate to get the token and then it's able to work. &amp;nbsp;This all requires interaction of a user to do so. &amp;nbsp;My goal is to create a cron job that will run hourly and copy any new files from a folder into my dropbox in order to have a backup copy of the files. &amp;nbsp;Is this possible? &amp;nbsp;If so, can anyone point me in the direction of an example?&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 20:25:16 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Cron-job-to-upload-files-from-server-to-Dropbox/m-p/381215#M873</guid>
      <dc:creator>jordonshaw</dc:creator>
      <dc:date>2019-12-03T20:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job to upload files from server to Dropbox</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Cron-job-to-upload-files-from-server-to-Dropbox/m-p/381223#M874</link>
      <description>&lt;P&gt;The token you get back after authorizing the app is called an "access token", and is specific to that particular app-user pair. Access tokens for your app don't expire by default, so once the app receives&amp;nbsp;one, you can have it store and re-use it, so it can make API calls in the future for that user without further manual user intervention.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, you'll probably want to have your app do something like this each time it runs:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;check if it has an access token stored already
&lt;UL&gt;
&lt;LI&gt;if it does, use that existing access token&lt;/LI&gt;
&lt;LI&gt;if it doesn't, send the user through the app authorization flow to get an access token, and store the resulting access token&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;call the API to upload the file(s)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;I don't have a sample of this to share in PHP though. Exactly what mechanism you use to store the access token will depend on what platform and libraries you're using. Keep in mind that the access token does enable access to the account, so you should store it securely.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 21:34:39 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Cron-job-to-upload-files-from-server-to-Dropbox/m-p/381223#M874</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2019-11-27T21:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job to upload files from server to Dropbox</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Cron-job-to-upload-files-from-server-to-Dropbox/m-p/381226#M875</link>
      <description>&lt;P&gt;I wondered if that might be the case. &amp;nbsp;Thank you so much for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 21:45:42 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Cron-job-to-upload-files-from-server-to-Dropbox/m-p/381226#M875</guid>
      <dc:creator>jordonshaw</dc:creator>
      <dc:date>2019-11-27T21:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job to upload files from server to Dropbox</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Cron-job-to-upload-files-from-server-to-Dropbox/m-p/382214#M884</link>
      <description>&lt;P&gt;What if you are not acting on behalf of the users? For example, in my case, we are just pushing files to Dropbox as part of an app-sync/integration. Do we need to provision an API user and build a UI around re-authenticating them?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 14:44:21 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Cron-job-to-upload-files-from-server-to-Dropbox/m-p/382214#M884</guid>
      <dc:creator>caseyprovost</dc:creator>
      <dc:date>2019-12-04T14:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Cron job to upload files from server to Dropbox</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Cron-job-to-upload-files-from-server-to-Dropbox/m-p/382248#M886</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1238222"&gt;@caseyprovost&lt;/a&gt;&amp;nbsp;In order to upload to&amp;nbsp;Dropbox via the&amp;nbsp;Dropbox API, you need to upload to some particular user account. If you don't need to connect to arbitrary end-user accounts, and are just connecting to your own account, for instance, you don't need to build the app authorization flow and UI. You can just get your own access token once and use that.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 16:51:06 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Cron-job-to-upload-files-from-server-to-Dropbox/m-p/382248#M886</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2019-12-04T16:51:06Z</dc:date>
    </item>
  </channel>
</rss>

