<?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: Authentication tokens keep expiring in Discuss Dropbox Developer &amp; API</title>
    <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Authentication-tokens-keep-expiring/m-p/473290#M1595</link>
    <description>&lt;P&gt;Previously,&amp;nbsp;Dropbox API access tokens did not expire, but we have begun moving to a new model of using short-lived access tokens with refresh tokens. You can find &lt;A href="https://dropbox.tech/developers/migrating-app-permissions-and-access-tokens" target="_self"&gt;more information here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you do need long-term access, you should migrate to using "refresh tokens", by requesting "offline" access. Make sure you're using the latest version of &lt;A href="https://github.com/dropbox/dropbox-sdk-python" target="_self"&gt;the Python SDK&lt;/A&gt;. You can find &lt;A href="https://github.com/dropbox/dropbox-sdk-python/blob/main/example/oauth/commandline-oauth-scopes.py" target="_self"&gt;an example of requesting "offline" access here&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Wed, 25 Nov 2020 15:21:32 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2020-11-25T15:21:32Z</dc:date>
    <item>
      <title>Authentication tokens keep expiring</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Authentication-tokens-keep-expiring/m-p/473132#M1593</link>
      <description>&lt;P&gt;I've got some python code that uploads files to my dropbox folder, but I must be doing something wrong, because my authentication tokens keep expiring, despite multiple claims that these tokens should be long-lived.&lt;/P&gt;
&lt;P&gt;I'm not using the test-api, but rather I did the following:&lt;/P&gt;
&lt;PRE&gt;dbx_oauth = dropbox.oauth.DropboxOAuth2FlowNoRedirect(DROPBOX_APP_KEY, DROPBOX_APP_SECRET)
url_for_oauth = dbx_oauth.start()
print(url_for_oauth)
# Follow the link, get a short code, copy it, and paste into the finish method:
oauth_result = dbx_oauth.finish('SomeCodeOrOtherBlahBlahBlah')
print(oauth_result.access_token)
# I now have a TOKEN that I use for the rest of the day...&lt;/PRE&gt;
&lt;P&gt;But as mentioned, this token expires and it's driving me nuts because it's messing up my work-flow.&lt;/P&gt;
&lt;P&gt;What am I doing wrong?&lt;/P&gt;
&lt;P&gt;Also, being the "owner" of my dropbox account, couldn't I bypass this whole token thing by using my app-key and and app-secret directly somehow??&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 14:07:01 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Authentication-tokens-keep-expiring/m-p/473132#M1593</guid>
      <dc:creator>autozoom3125</dc:creator>
      <dc:date>2020-11-25T14:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication tokens keep expiring</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Authentication-tokens-keep-expiring/m-p/473290#M1595</link>
      <description>&lt;P&gt;Previously,&amp;nbsp;Dropbox API access tokens did not expire, but we have begun moving to a new model of using short-lived access tokens with refresh tokens. You can find &lt;A href="https://dropbox.tech/developers/migrating-app-permissions-and-access-tokens" target="_self"&gt;more information here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you do need long-term access, you should migrate to using "refresh tokens", by requesting "offline" access. Make sure you're using the latest version of &lt;A href="https://github.com/dropbox/dropbox-sdk-python" target="_self"&gt;the Python SDK&lt;/A&gt;. You can find &lt;A href="https://github.com/dropbox/dropbox-sdk-python/blob/main/example/oauth/commandline-oauth-scopes.py" target="_self"&gt;an example of requesting "offline" access here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 15:21:32 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Authentication-tokens-keep-expiring/m-p/473290#M1595</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-11-25T15:21:32Z</dc:date>
    </item>
  </channel>
</rss>

