<?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: Node.js server-side auth in Discuss Dropbox Developer &amp; API</title>
    <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Node-js-server-side-auth/m-p/666943#M3255</link>
    <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1634460"&gt;@koradev_shane&lt;/a&gt;&amp;nbsp;Здравко is correct; you'll need to process the OAuth app authorization flow at least once per account. For long-term access, you should request "offline" access to get a refresh token. Refresh tokens don't expire and can be re-used repeatedly without manual user interaction. You can find more information in 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/migrating-app-permissions-and-access-tokens#updating-access-token-type" target="_blank"&gt;https://dropbox.tech/developers/migrating-app-permissions-and-access-tokens#updating-access-token-type&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;LI&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-js/blob/b5631e4b5b0e9eb6d3297e1ee57ad29a63d49898/examples/javascript/PKCE-backend/code_flow_example.js#L38" target="_blank"&gt;https://github.com/dropbox/dropbox-sdk-js/blob/b5631e4b5b0e9eb6d3297e1ee57ad29a63d49898/examples/javascript/PKCE-backend/code_flow_example.js#L38&lt;/A&gt; &lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Fri, 10 Mar 2023 16:30:45 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2023-03-10T16:30:45Z</dc:date>
    <item>
      <title>Node.js server-side auth</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Node-js-server-side-auth/m-p/666762#M3249</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am building an application using Strapi where users can upload files to the Strapi server (no dropbox needed at this point). Every week, I need to backup the files from the server to dropbox. This should happen without user interaction.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I authenticate the Node server with my Dropbox app to be able to upload these files? From what I understand of the OAuth flow, user interaction is required to authenticate (visit auth URL, tap Agree/Allow, be redirected with the `code` value in query and then use dbx SDK to getAccessTokenWithCode).&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 19:48:39 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Node-js-server-side-auth/m-p/666762#M3249</guid>
      <dc:creator>koradev_shane</dc:creator>
      <dc:date>2023-03-10T19:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: Node.js server-side auth</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Node-js-server-side-auth/m-p/666870#M3252</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1634460"&gt;@koradev_shane&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;... From what I understand of the OAuth flow, user interaction is required to authenticate (visit auth URL, tap Agree/Allow, be redirected with the `code` value in query and then use dbx SDK to getAccessTokenWithCode).&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1634460"&gt;@koradev_shane&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Yes, you need to perform OAuth flow least once. It depend is your action is one time action (or multiple times in short period ~4 hours) or need to proceed for longer. If you need one time action - access token generated either from your application page or received with OAuth flow should be enough. If you need access for longer, you need offline access type through refresh token. The OAuth flow itself doesn't need to be performed on your server. You can perform such a flow on the machine you have used to make above post (or any other machine) and use received results on your server without anything like URL, agree etc. there. &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt; Take a look how you can perform simplistic OAuth flow by hand &lt;A href="https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Issue-in-generating-access-token/m-p/592667" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 12:07:02 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Node-js-server-side-auth/m-p/666870#M3252</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-03-10T12:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Node.js server-side auth</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Node-js-server-side-auth/m-p/666943#M3255</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1634460"&gt;@koradev_shane&lt;/a&gt;&amp;nbsp;Здравко is correct; you'll need to process the OAuth app authorization flow at least once per account. For long-term access, you should request "offline" access to get a refresh token. Refresh tokens don't expire and can be re-used repeatedly without manual user interaction. You can find more information in 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/migrating-app-permissions-and-access-tokens#updating-access-token-type" target="_blank"&gt;https://dropbox.tech/developers/migrating-app-permissions-and-access-tokens#updating-access-token-type&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;LI&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-js/blob/b5631e4b5b0e9eb6d3297e1ee57ad29a63d49898/examples/javascript/PKCE-backend/code_flow_example.js#L38" target="_blank"&gt;https://github.com/dropbox/dropbox-sdk-js/blob/b5631e4b5b0e9eb6d3297e1ee57ad29a63d49898/examples/javascript/PKCE-backend/code_flow_example.js#L38&lt;/A&gt; &lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Fri, 10 Mar 2023 16:30:45 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Node-js-server-side-auth/m-p/666943#M3255</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-03-10T16:30:45Z</dc:date>
    </item>
  </channel>
</rss>

