<?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 Using dropbox API from a scheduled Task: authenticating but NOT as a User in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Using-dropbox-API-from-a-scheduled-Task-authenticating-but-NOT/m-p/757329#M33124</link>
    <description>&lt;P&gt;I need a job that moves 4 times a day files from a folder to dropbox and reading other files from another folder . Designin the architecture is not a problem. However I'm stuck with the API of dropbox. development done from mulesoft.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/developers/reference/auth-types#app" target="_blank" rel="noopener"&gt;Authentication types - Developers - Dropbox&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see two main authentication types:&lt;BR /&gt;1) Oauth =&amp;gt; it requires user to manually log in each time from a web form: requires manual interaction and a web service&lt;/P&gt;&lt;P&gt;2) App authentication =&amp;gt; nice basic authentication, easy peasy.... or not. Because&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://api.dropboxapi.com/2/files/list_folder" target="_blank" rel="noopener"&gt;https://api.dropboxapi.com/2/files/list_folder&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;returns&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"error_summary"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"path/unsupported_content_type/"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"error"&lt;/SPAN&gt;&lt;SPAN&gt;: {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;".tag"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"path"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"path"&lt;/SPAN&gt;&lt;SPAN&gt;: {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;".tag"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"unsupported_content_type"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;and searching for errors the problem is I cannot use the "path" because app authentication do not allow that.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;A href="https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/When-trying-to-list-folder-contents-error-happens/td-p/618956" target="_blank" rel="noopener"&gt;Solved: When trying to list folder contents, error happens - Dropbox Community (dropboxforum.com)&lt;/A&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;So is there any authentication method that allows me to setup a "fire and forget forever" scheduled job? I need to move files and display them, my app is already configured correctly.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I tried to use of official Mulesoft Dropbox User Connector... It works to a certain degree. From what I understand there must be an additional authentication method not documented, because the connector is able to list the files.. given only the basic credentials.. however I cannot use the official mulesoft dropbox connector because it miss the&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;2/files/list_folder/continue&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;So basically I'm locked out of my task becase either:&lt;BR /&gt;1) there is not a authentication that works without user interaction that allows to access basic functionality (think it as a Backend to Backend requirment)&lt;/DIV&gt;&lt;DIV&gt;2) the piece of software that would allow such communication happen (using maybe a undocumented authentication feature?) has missing functionalities&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;AND the grant_type "client_credentials" is not working:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DarioO_0-1710410035803.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/44727iBC13E1FDB603F7DC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DarioO_0-1710410035803.png" alt="DarioO_0-1710410035803.png" /&gt;&lt;/span&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"error"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"The server has either erred or is incapable of performing the requested operation."&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 14 Mar 2024 10:20:45 GMT</pubDate>
    <dc:creator>DarioO</dc:creator>
    <dc:date>2024-03-14T10:20:45Z</dc:date>
    <item>
      <title>Using dropbox API from a scheduled Task: authenticating but NOT as a User</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Using-dropbox-API-from-a-scheduled-Task-authenticating-but-NOT/m-p/757329#M33124</link>
      <description>&lt;P&gt;I need a job that moves 4 times a day files from a folder to dropbox and reading other files from another folder . Designin the architecture is not a problem. However I'm stuck with the API of dropbox. development done from mulesoft.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/developers/reference/auth-types#app" target="_blank" rel="noopener"&gt;Authentication types - Developers - Dropbox&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see two main authentication types:&lt;BR /&gt;1) Oauth =&amp;gt; it requires user to manually log in each time from a web form: requires manual interaction and a web service&lt;/P&gt;&lt;P&gt;2) App authentication =&amp;gt; nice basic authentication, easy peasy.... or not. Because&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://api.dropboxapi.com/2/files/list_folder" target="_blank" rel="noopener"&gt;https://api.dropboxapi.com/2/files/list_folder&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;returns&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"error_summary"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"path/unsupported_content_type/"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"error"&lt;/SPAN&gt;&lt;SPAN&gt;: {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;".tag"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"path"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"path"&lt;/SPAN&gt;&lt;SPAN&gt;: {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;".tag"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"unsupported_content_type"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;and searching for errors the problem is I cannot use the "path" because app authentication do not allow that.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;A href="https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/When-trying-to-list-folder-contents-error-happens/td-p/618956" target="_blank" rel="noopener"&gt;Solved: When trying to list folder contents, error happens - Dropbox Community (dropboxforum.com)&lt;/A&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;So is there any authentication method that allows me to setup a "fire and forget forever" scheduled job? I need to move files and display them, my app is already configured correctly.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I tried to use of official Mulesoft Dropbox User Connector... It works to a certain degree. From what I understand there must be an additional authentication method not documented, because the connector is able to list the files.. given only the basic credentials.. however I cannot use the official mulesoft dropbox connector because it miss the&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;2/files/list_folder/continue&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;So basically I'm locked out of my task becase either:&lt;BR /&gt;1) there is not a authentication that works without user interaction that allows to access basic functionality (think it as a Backend to Backend requirment)&lt;/DIV&gt;&lt;DIV&gt;2) the piece of software that would allow such communication happen (using maybe a undocumented authentication feature?) has missing functionalities&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;AND the grant_type "client_credentials" is not working:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DarioO_0-1710410035803.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/44727iBC13E1FDB603F7DC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DarioO_0-1710410035803.png" alt="DarioO_0-1710410035803.png" /&gt;&lt;/span&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"error"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"The server has either erred or is incapable of performing the requested operation."&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 14 Mar 2024 10:20:45 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Using-dropbox-API-from-a-scheduled-Task-authenticating-but-NOT/m-p/757329#M33124</guid>
      <dc:creator>DarioO</dc:creator>
      <dc:date>2024-03-14T10:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using dropbox API from a scheduled Task: authenticating but NOT as a User</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Using-dropbox-API-from-a-scheduled-Task-authenticating-but-NOT/m-p/757408#M33127</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1813335"&gt;@DarioO&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;...&lt;BR /&gt;1) Oauth =&amp;gt; it requires user to manually log in each time from a web form: requires manual interaction and a web service&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;...&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1813335"&gt;@DarioO&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You have a lot of misunderstandings how Dropbox API and OAuth work, but the above, that I underlined, is most important, I think.&lt;/P&gt;&lt;P&gt;In general No - you don't need log in each time if you have unexpiring token - refresh token. Access token expires and most probably you're taking into account only that part. If you authorize your access as offline type (i.e. you receive refresh token in addition to access token), you can refresh your access token using the available refresh token without additional user interaction. An simplistic example can be seen &lt;A href="https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Issue-in-generating-access-token/m-p/592921/highlight/true#M27586" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 15:10:40 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Using-dropbox-API-from-a-scheduled-Task-authenticating-but-NOT/m-p/757408#M33127</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2024-03-14T15:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: Using dropbox API from a scheduled Task: authenticating but NOT as a User</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Using-dropbox-API-from-a-scheduled-Task-authenticating-but-NOT/m-p/757413#M33128</link>
      <description>&lt;P&gt;That's exactly what I would prefer to avoid. If something wrong I need to get another "code" from user Login and put it on back again. I guess that's would never be possibile, and anyway the mulesoft connector is working with Basic credentials, how does that works?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 15:20:03 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Using-dropbox-API-from-a-scheduled-Task-authenticating-but-NOT/m-p/757413#M33128</guid>
      <dc:creator>DarioO</dc:creator>
      <dc:date>2024-03-14T15:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using dropbox API from a scheduled Task: authenticating but NOT as a User</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Using-dropbox-API-from-a-scheduled-Task-authenticating-but-NOT/m-p/757431#M33130</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1813335"&gt;@DarioO&lt;/a&gt; If you only needed to list the contents of a folder by using a shared link to that folder, you could use &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder" target="_blank"&gt;/2/files/list_folder&lt;/A&gt; and &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-continue" target="_blank"&gt;/2/files/list_folder/continue&lt;/A&gt; with &lt;A href="https://www.dropbox.com/developers/reference/auth-types#app" target="_blank"&gt;app authentication&lt;/A&gt;. That would involve sending an app key and secret on both calls, and the shared link in the "shared_link" parameter on the &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder" target="_blank"&gt;/2/files/list_folder&lt;/A&gt; call.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need to be able to move files in the account though, e.g., using &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-move" target="_blank"&gt;/2/files/move_v2&lt;/A&gt; or &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-move_batch" target="_blank"&gt;/2/files/move_batch_v2&lt;/A&gt;, you do need an access token for that account (instead of just the app key/secret), as that requires &lt;A href="https://www.dropbox.com/developers/reference/auth-types#user" target="_blank"&gt;user authentication&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In order to get an access token for an account, you do need to process the app authorization flow for that account at least once. As Здравко mentioned though, you only need to do that once if you request "offline" access. Doing so would give you a refresh token, which doesn't expire, and which can be used programmatically and repeatedly, without the user manually re-authorizing the app each time, to get a new access token whenever needed. The new access tokens can then be used to perform more folder listing and move calls.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For more information on using this authorization functionality, refer to the following resources:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://developers.dropbox.com/oauth-guide" target="_blank"&gt;https://developers.dropbox.com/oauth-guide&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#authorization" target="_blank"&gt;https://www.dropbox.com/developers/documentation/http/documentation#authorization&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://dropbox.tech/developers/using-oauth-2-0-with-offline-access" target="_blank"&gt;https://dropbox.tech/developers/using-oauth-2-0-with-offline-access&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Thu, 14 Mar 2024 16:05:27 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Using-dropbox-API-from-a-scheduled-Task-authenticating-but-NOT/m-p/757431#M33130</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2024-03-14T16:05:27Z</dc:date>
    </item>
  </channel>
</rss>

