<?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: Is it possible to get a permanent token for uploading files to one specific account? in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Is-it-possible-to-get-a-permanent-token-for-uploading-files-to/m-p/712114#M31539</link>
    <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1743102"&gt;@isaacfink&lt;/a&gt; In addition to the one Здравко shared, you can find &lt;A href="https://dropbox.tech/developers/using-oauth-2-0-with-offline-access#using-offline-access" target="_blank"&gt;an example of running it manually using curl in the blog post here&lt;/A&gt;, and &lt;A href="https://github.com/dropbox/dropbox-sdk-js/blob/b5631e4b5b0e9eb6d3297e1ee57ad29a63d49898/examples/javascript/PKCE-backend/code_flow_example.js#L38" target="_blank"&gt;an example of running it in the JavaScript SDK here&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Sep 2023 13:51:34 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2023-09-07T13:51:34Z</dc:date>
    <item>
      <title>Is it possible to get a permanent token for uploading files to one specific account?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Is-it-possible-to-get-a-permanent-token-for-uploading-files-to/m-p/712091#M31534</link>
      <description>&lt;P&gt;I have the following workflow in my application&lt;/P&gt;&lt;P&gt;I am generating some files and I am saving it to a dropbox account, the files are only saved to one specific account and the app and account are under the same email/user&lt;/P&gt;&lt;P&gt;I keep getting expired access token when using the js sdk, is there a way to get around this? here is my code to upload files&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const dropbox = require("dropbox");

const client = new dropbox.Dropbox({
  accessToken: token,
});

await client.filesUpload({
  path:'/folder/image.jpg',
  contents: buffer,
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but that gives me an error after a couple of hours, I don't want to have to go through 0auth flow because this a simple node script and not a complete application&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 12:53:12 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Is-it-possible-to-get-a-permanent-token-for-uploading-files-to/m-p/712091#M31534</guid>
      <dc:creator>isaacfink</dc:creator>
      <dc:date>2023-09-07T12:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to get a permanent token for uploading files to one specific account?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Is-it-possible-to-get-a-permanent-token-for-uploading-files-to/m-p/712095#M31535</link>
      <description>&lt;P&gt;Dropbox is no longer offering the option for creating new long-lived access tokens. Dropbox is now issuing short-lived access tokens (and optional refresh tokens) instead of long-lived access tokens. You can find &lt;A href="https://dropbox.tech/developers/migrating-app-permissions-and-access-tokens#updating-access-token-type" rel="noopener noreferrer" target="_blank"&gt;more information on this migration here&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;Apps can still get long-term access by requesting "offline" access though, in which case the app receives a "refresh token" that can be used to retrieve new short-lived access tokens as needed, without further manual user intervention. Refresh tokens do not expire and can be store and re-used repeatedly. While you do need to use the OAuth app authorization flow to get a refresh token, this only needs to be done once per account. You can find more information in the &lt;A href="https://developers.dropbox.com/oauth-guide" rel="noopener noreferrer" target="_blank"&gt;OAuth Guide&lt;/A&gt; and &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#authorization" rel="noopener noreferrer" target="_blank"&gt;authorization documentation&lt;/A&gt;. There's a basic outline of processing this flow in &lt;A href="https://dropbox.tech/developers/using-oauth-2-0-with-offline-access" rel="noopener noreferrer" target="_blank"&gt;this blog post&lt;/A&gt; which may serve as a useful example.&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;For examples of implementing this with &lt;A href="https://github.com/dropbox/dropbox-sdk-js" rel="noopener noreferrer" target="_blank"&gt;the Dropbox JavaScript SDK&lt;/A&gt;, please refer to the examples included in &lt;A href="https://github.com/dropbox/dropbox-sdk-js/tree/main/examples/javascript" rel="noopener noreferrer" target="_blank"&gt;the "examples" folder in the SDK&lt;/A&gt;. As long as you supply the necessary credentials, for instance, set the app key (a.k.a. client ID) and refresh token, like shown in &lt;A href="https://github.com/dropbox/dropbox-sdk-js/blob/b5631e4b5b0e9eb6d3297e1ee57ad29a63d49898/examples/javascript/PKCE-backend/code_flow_example.js#L38" rel="noopener noreferrer" target="_blank"&gt;this example for the JavaScript SDK&lt;/A&gt;, the SDK will actually handle refresh process for you automatically. (Note that the app secret is also required if the app does not use PKCE.) The SDK will automatically catch expired access token errors and call the API to get a new short-lived access token when needed.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 13:00:33 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Is-it-possible-to-get-a-permanent-token-for-uploading-files-to/m-p/712095#M31535</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-09-07T13:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to get a permanent token for uploading files to one specific account?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Is-it-possible-to-get-a-permanent-token-for-uploading-files-to/m-p/712101#M31536</link>
      <description>&lt;P&gt;I is there an example of an 0auth flow? I would like to run it once locally so I can get the token&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 13:26:06 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Is-it-possible-to-get-a-permanent-token-for-uploading-files-to/m-p/712101#M31536</guid>
      <dc:creator>isaacfink</dc:creator>
      <dc:date>2023-09-07T13:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to get a permanent token for uploading files to one specific account?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Is-it-possible-to-get-a-permanent-token-for-uploading-files-to/m-p/712109#M31538</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1743102"&gt;@isaacfink&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;I is there an example of an 0auth flow? I would like to run it once locally so I can get the token&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/1743102"&gt;@isaacfink&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;A good and simple example for running locally 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;. You have to follow all steps (without the last one; it's executed inside SDK). Since PKCE is no used there, you'll need pass refresh token, appkey, and appsecret, as Greg mentioned already.&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 13:38:06 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Is-it-possible-to-get-a-permanent-token-for-uploading-files-to/m-p/712109#M31538</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-09-07T13:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to get a permanent token for uploading files to one specific account?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Is-it-possible-to-get-a-permanent-token-for-uploading-files-to/m-p/712114#M31539</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1743102"&gt;@isaacfink&lt;/a&gt; In addition to the one Здравко shared, you can find &lt;A href="https://dropbox.tech/developers/using-oauth-2-0-with-offline-access#using-offline-access" target="_blank"&gt;an example of running it manually using curl in the blog post here&lt;/A&gt;, and &lt;A href="https://github.com/dropbox/dropbox-sdk-js/blob/b5631e4b5b0e9eb6d3297e1ee57ad29a63d49898/examples/javascript/PKCE-backend/code_flow_example.js#L38" target="_blank"&gt;an example of running it in the JavaScript SDK here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 13:51:34 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Is-it-possible-to-get-a-permanent-token-for-uploading-files-to/m-p/712114#M31539</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-09-07T13:51:34Z</dc:date>
    </item>
  </channel>
</rss>

