<?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: dropbox.exceptions.AuthError: expired access token in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/585635#M27266</link>
    <description>&lt;P&gt;Hi Greg,&lt;BR /&gt;i can't get this to work.&lt;BR /&gt;i run:&lt;BR /&gt;=========================================================================&lt;BR /&gt;import dropbox&lt;BR /&gt;from dropbox import DropboxOAuth2FlowNoRedirect&lt;BR /&gt;APP_KEY = "4x7l7q37wevf5co"&lt;BR /&gt;APP_SECRET = "&amp;lt;redacted&amp;gt;"&lt;BR /&gt;auth_flow = DropboxOAuth2FlowNoRedirect(APP_KEY,&lt;BR /&gt;consumer_secret=APP_SECRET,&lt;BR /&gt;token_access_type='offline',&lt;BR /&gt;scope=['files.metadata.read'])&lt;BR /&gt;authorize_url = auth_flow.start()&lt;BR /&gt;print("1. Go to: " + authorize_url)&lt;BR /&gt;print("2. Click \"Allow\" (you might have to log in first).")&lt;BR /&gt;print("3. Copy the authorization code.")&lt;BR /&gt;auth_code = input("Enter the authorization code here: ").strip()&lt;BR /&gt;try:&lt;BR /&gt;oauth_result = auth_flow.finish(auth_code)&lt;BR /&gt;# Oauth token has files.metadata.read scope only&lt;BR /&gt;assert oauth_result.scope == 'files.metadata.read'&lt;BR /&gt;except Exception as e:&lt;BR /&gt;print('Error: %s' % (e,))&lt;BR /&gt;exit(1)&lt;BR /&gt;with dropbox.Dropbox(oauth2_access_token=oauth_result.access_token,&lt;BR /&gt;oauth2_access_token_expiration=oauth_result.expires_at,&lt;BR /&gt;oauth2_refresh_token=oauth_result.refresh_token,&lt;BR /&gt;app_key=APP_KEY,&lt;BR /&gt;app_secret=APP_SECRET):&lt;BR /&gt;print("Successfully set up client!")&lt;BR /&gt;=========================================================================&lt;BR /&gt;I get 'Successfully set up client!'&lt;BR /&gt;Where do i go from here ?&lt;BR /&gt;I'm developping an app which downloads it's config files from dropbox at the start. At the moment i need to regenerate the token every 4h ....&lt;BR /&gt;Any advantages for this kind of project if i take the business dropbox ?&lt;BR /&gt;Cheers ? John&lt;/P&gt;</description>
    <pubDate>Wed, 23 Mar 2022 14:25:29 GMT</pubDate>
    <dc:creator>Johnson9070</dc:creator>
    <dc:date>2022-03-23T14:25:29Z</dc:date>
    <item>
      <title>dropbox.exceptions.AuthError: expired access token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/580407#M27078</link>
      <description>&lt;P&gt;When I run an app I developed, I get an error.&lt;/P&gt;
&lt;P&gt;dropbox.exceptions.AuthError: AuthError('89ade68e26bd49d592d01bfbfae5659b', AuthError('expired_access_token', None))&lt;/P&gt;
&lt;P&gt;What could be wrong with my OAuth code?&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;&lt;BR /&gt;def &lt;/SPAN&gt;oauth_flow():&lt;BR /&gt;    &lt;SPAN&gt;return &lt;/SPAN&gt;DropboxOAuth2Flow(&lt;BR /&gt;        APP_KEY,&lt;BR /&gt;        &lt;SPAN&gt;'https://dropbox-notifications.herokuapp.com/oauth-callback'&lt;/SPAN&gt;,&lt;BR /&gt;        session,&lt;BR /&gt;        &lt;SPAN&gt;'dropbox-auth-csrf-token'&lt;/SPAN&gt;,&lt;BR /&gt;        APP_SECRET&lt;BR /&gt;    )&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@app.route&lt;/SPAN&gt;(&lt;SPAN&gt;'/oauth-callback'&lt;/SPAN&gt;)&lt;BR /&gt;&lt;SPAN&gt;def &lt;/SPAN&gt;oauth_callback():&lt;BR /&gt;    auth_result = oauth_flow().finish(request.args)&lt;BR /&gt;    access_token = auth_result.access_token&lt;BR /&gt;    account = auth_result.account_id&lt;BR /&gt;&lt;BR /&gt;    redis_client.hset(&lt;SPAN&gt;'tokens'&lt;/SPAN&gt;, account, access_token)&lt;BR /&gt;&lt;BR /&gt;    process_user(account)&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN&gt;return &lt;/SPAN&gt;redirect(url_for(&lt;SPAN&gt;'done'&lt;/SPAN&gt;))&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@app.route&lt;/SPAN&gt;(&lt;SPAN&gt;'/login'&lt;/SPAN&gt;)&lt;BR /&gt;&lt;SPAN&gt;def &lt;/SPAN&gt;login():&lt;BR /&gt;    &lt;SPAN&gt;return &lt;/SPAN&gt;redirect(oauth_flow().start())&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 11:12:59 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/580407#M27078</guid>
      <dc:creator>af11</dc:creator>
      <dc:date>2022-03-29T11:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: dropbox.exceptions.AuthError: expired access token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/580435#M27079</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1506044"&gt;@af11&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;At present all access tokens expire after 4 hours. In your example you are relying on access token only without refresh token! If you want prolong your access without additional user interaction, code has to query 'offline' token type and you should care for the 'refresh_token' within result too, aside of 'access_token'. By default the refresh token doesn't expire. Use it in client object initialization too.&lt;/P&gt;</description>
      <pubDate>Sun, 27 Feb 2022 17:05:02 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/580435#M27079</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2022-02-27T17:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: dropbox.exceptions.AuthError: expired access token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/580591#M27092</link>
      <description>&lt;P&gt;That's correct, Dropbox is in the process of switching to only 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" target="_blank" rel="noopener noreferrer"&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. You can find more information in the &lt;A href="https://developers.dropbox.com/oauth-guide" target="_blank" rel="noopener noreferrer"&gt;OAuth Guide&lt;/A&gt; and &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#authorization" target="_blank" rel="noopener noreferrer"&gt;authorization documentation&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;For reference, while the creation of new long-lived access tokens is now deprecated, we don't currently have a plan to disable existing long-lived access tokens. (If that changes, we will of course announce that ahead of time.) That being the case, you can continue using existing long-lived access token(s) without interruption, if you have any. Also, note though that after the change you won't be able to create new long-lived access tokens.&lt;BR /&gt;&lt;BR /&gt;While the change began on September 30th 2021, we're releasing it gradually, so you may not have seen your app(s) affected until now. Once it applies to your app, it would apply regardless of the "Access token expiration" setting for your app, and that setting may no longer be available for your app.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can find &lt;A href="https://github.com/dropbox/dropbox-sdk-python/blob/main/example/oauth/commandline-oauth-scopes.py#L81" target="_self"&gt;an example of getting and setting the refresh token with the Dropbox API v2 Python SDK here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 17:05:11 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/580591#M27092</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-02-28T17:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: dropbox.exceptions.AuthError: expired access token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/585635#M27266</link>
      <description>&lt;P&gt;Hi Greg,&lt;BR /&gt;i can't get this to work.&lt;BR /&gt;i run:&lt;BR /&gt;=========================================================================&lt;BR /&gt;import dropbox&lt;BR /&gt;from dropbox import DropboxOAuth2FlowNoRedirect&lt;BR /&gt;APP_KEY = "4x7l7q37wevf5co"&lt;BR /&gt;APP_SECRET = "&amp;lt;redacted&amp;gt;"&lt;BR /&gt;auth_flow = DropboxOAuth2FlowNoRedirect(APP_KEY,&lt;BR /&gt;consumer_secret=APP_SECRET,&lt;BR /&gt;token_access_type='offline',&lt;BR /&gt;scope=['files.metadata.read'])&lt;BR /&gt;authorize_url = auth_flow.start()&lt;BR /&gt;print("1. Go to: " + authorize_url)&lt;BR /&gt;print("2. Click \"Allow\" (you might have to log in first).")&lt;BR /&gt;print("3. Copy the authorization code.")&lt;BR /&gt;auth_code = input("Enter the authorization code here: ").strip()&lt;BR /&gt;try:&lt;BR /&gt;oauth_result = auth_flow.finish(auth_code)&lt;BR /&gt;# Oauth token has files.metadata.read scope only&lt;BR /&gt;assert oauth_result.scope == 'files.metadata.read'&lt;BR /&gt;except Exception as e:&lt;BR /&gt;print('Error: %s' % (e,))&lt;BR /&gt;exit(1)&lt;BR /&gt;with dropbox.Dropbox(oauth2_access_token=oauth_result.access_token,&lt;BR /&gt;oauth2_access_token_expiration=oauth_result.expires_at,&lt;BR /&gt;oauth2_refresh_token=oauth_result.refresh_token,&lt;BR /&gt;app_key=APP_KEY,&lt;BR /&gt;app_secret=APP_SECRET):&lt;BR /&gt;print("Successfully set up client!")&lt;BR /&gt;=========================================================================&lt;BR /&gt;I get 'Successfully set up client!'&lt;BR /&gt;Where do i go from here ?&lt;BR /&gt;I'm developping an app which downloads it's config files from dropbox at the start. At the moment i need to regenerate the token every 4h ....&lt;BR /&gt;Any advantages for this kind of project if i take the business dropbox ?&lt;BR /&gt;Cheers ? John&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 14:25:29 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/585635#M27266</guid>
      <dc:creator>Johnson9070</dc:creator>
      <dc:date>2022-03-23T14:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: dropbox.exceptions.AuthError: expired access token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/585676#M27269</link>
      <description>&lt;P&gt;If you're getting "Successfully set up client" from that code, that indicates you've processed the app authorization flow and should now have the necessary credentials, so you can use that dropbox.Dropbox object to make calls. That particular example just shows the authorization flow, but you can save that object like 'with dropbox.Dropbox(&amp;lt;credentials as shown&amp;gt;) as dbx' or 'dbx = dropbox.Dropbox(&amp;lt;credentials as shown&amp;gt;)' and then use the 'dbx' object to make whatever API calls you need. As long as you give it those credentials and the credentials are still valid, the SDK will perform the refresh for you automatically.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 14:32:22 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/585676#M27269</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-03-23T14:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: dropbox.exceptions.AuthError: expired access token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/586533#M27295</link>
      <description>&lt;P&gt;Hi Greg,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does this mean that the user gets the logon window to authorize each time ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers , John&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Mar 2022 00:07:27 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/586533#M27295</guid>
      <dc:creator>Johnson9070</dc:creator>
      <dc:date>2022-03-27T00:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: dropbox.exceptions.AuthError: expired access token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/586537#M27296</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/10"&gt;@Greg-DB&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;... and then use the 'dbx' object to make whatever API calls you need. As long as you give it those credentials and the credentials are still valid, the &lt;STRONG&gt;SDK will perform the refresh for you automatically&lt;/STRONG&gt;.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1527866"&gt;@Johnson9070&lt;/a&gt;, If there is automatic access token refresh, why are you thinking that authorization would be ever need anew (I assume wouldn't explicitly revoked somehow)?! 🤷 Refresh token doesn't expire itself, despite regular access token expire after 4 hours. Whenever needed the SDK will take care to "refresh" regular access token using the refresh token. &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; That's it. It's up to you to call method(s) needed to perform desired action in your application; nothing more once authenticated already.&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Sun, 27 Mar 2022 00:31:16 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/586537#M27296</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2022-03-27T00:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: dropbox.exceptions.AuthError: expired access token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/586541#M27297</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I'm relatively new at python.&lt;/P&gt;&lt;P&gt;At the moment i log on like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;def &lt;/SPAN&gt;&lt;SPAN&gt;Dropbox_logon&lt;/SPAN&gt;(&lt;SPAN&gt;self&lt;/SPAN&gt;):&lt;BR /&gt;    &lt;SPAN&gt;self&lt;/SPAN&gt;.dbx = dropbox.Dropbox(&lt;SPAN&gt;self&lt;/SPAN&gt;.token)&lt;BR /&gt;    &lt;SPAN&gt;x &lt;/SPAN&gt;= &lt;SPAN&gt;self&lt;/SPAN&gt;.dbx.users_get_current_account()&lt;BR /&gt;    &lt;SPAN&gt;print&lt;/SPAN&gt;(&lt;SPAN&gt;'Logon ok'&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;I'm a bit lost how to write this with the auth flow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Mar 2022 00:52:40 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/586541#M27297</guid>
      <dc:creator>Johnson9070</dc:creator>
      <dc:date>2022-03-27T00:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: dropbox.exceptions.AuthError: expired access token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/586547#M27298</link>
      <description>&lt;P&gt;&lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@9AD39CA637682E9616FBE31CDAF1B6C4/emoticons/1f914.png" alt=":thinking_face:" title=":thinking_face:" /&gt; To be honest, I'm not sure what exactly you are looking for.&lt;/P&gt;&lt;P&gt;You have OAuth flow completed already and received corresponding authentication info (oauth_result.access_token, oauth_result.expires_at, and oauth_result.refresh_token); take a look on your post above. You can keep this entire information in the same way you do for your access token (the only thing seems you are keeping now). You can have fields like 'self.access_token', 'self.expires_at', and 'self.refresh_token' in your class (for example), instead of 'self.token' only. Isn't it? &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; So, when you build a Dropbox client, like in your last post, you can perform it the same way like in your previous post.&lt;/P&gt;&lt;P&gt;What confused you actually and so you have wiped out the correct initialization? 🤷 Just take one more look on your own post above! If need learn little more the basic Python syntax.&lt;/P&gt;&lt;P&gt;Hope this gives some direction.&lt;/P&gt;</description>
      <pubDate>Sun, 27 Mar 2022 01:22:19 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/586547#M27298</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2022-03-27T01:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: dropbox.exceptions.AuthError: expired access token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/586957#M27310</link>
      <description>&lt;P&gt;I see in the documentation it says this "&lt;SPAN&gt;If the &amp;lt;token_access_type&amp;gt; is omitted, the response will default to returning a long-lived &lt;/SPAN&gt;&lt;SPAN&gt;access_token&lt;/SPAN&gt;&lt;SPAN&gt; if they are allowed in the app console. If long-lived access tokens are disabled in the app console, this parameter defaults to &lt;/SPAN&gt;&lt;SPAN&gt;online". When I looked in the app console I could find a reference to long lived access tokens but, in another part of the documentation it shows a screen that has an "access token expiration (with options for short and long lived)" underneath the option to Generate Access Token. I do not see that on my&amp;nbsp;screen however (ie. nothing&amp;nbsp;underneath Generate Access Token to indicate the expiration period). I too need to dish out long lived access tokens to my users. Thanks for any clarification you can provide. PS both pieces of information were taken from documentation on the DropBox website today (under documentation). Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 12:04:06 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/586957#M27310</guid>
      <dc:creator>marksmithhfx</dc:creator>
      <dc:date>2022-03-29T12:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: dropbox.exceptions.AuthError: expired access token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/586958#M27311</link>
      <description>&lt;P&gt;Sorry, error in my last post. Where I said "&lt;SPAN&gt;I could find a reference to long lived access tokens" I meant to say "I could NOT find a reference to long lived access tokens". Sorry for any confusions. My whole point is I cannot find this reference to a long lived access token in my app settings. Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 12:06:53 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/586958#M27311</guid>
      <dc:creator>marksmithhfx</dc:creator>
      <dc:date>2022-03-29T12:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: dropbox.exceptions.AuthError: expired access token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/586977#M27314</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1529083"&gt;@marksmithhfx&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Generation of long lived access token has been dropped already, despite of available (generated before) can be used still. Yes, some documentation isn't very clear unfortunately.&amp;nbsp;🤷 Maybe the are not updated yet.&lt;/P&gt;&lt;P&gt;Usage of refresh token can be used to achieve the same user experience - it doesn't expire. &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; That's it. When you read something about long lived access token, think of it as a &lt;EM&gt;history&lt;/EM&gt; (mostly). &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@FBF7D2AB59A0D6E861EBF6A36F93B7E2/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 13:22:28 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/586977#M27314</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2022-03-29T13:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: dropbox.exceptions.AuthError: expired access token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/587298#M27327</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1527866"&gt;@Johnson9070&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Greg,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does this mean that the user gets the logon window to authorize each time ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers , John&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The user will see the login window to authorize just once.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1527866"&gt;@Johnson9070&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi ,&lt;/P&gt;
&lt;P&gt;I'm relatively new at python.&lt;/P&gt;
&lt;P&gt;At the moment i log on like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;def &lt;/SPAN&gt;&lt;SPAN&gt;Dropbox_logon&lt;/SPAN&gt;(&lt;SPAN&gt;self&lt;/SPAN&gt;):&lt;BR /&gt;    &lt;SPAN&gt;self&lt;/SPAN&gt;.dbx = dropbox.Dropbox(&lt;SPAN&gt;self&lt;/SPAN&gt;.token)&lt;BR /&gt;    &lt;SPAN&gt;x &lt;/SPAN&gt;= &lt;SPAN&gt;self&lt;/SPAN&gt;.dbx.users_get_current_account()&lt;BR /&gt;    &lt;SPAN&gt;print&lt;/SPAN&gt;(&lt;SPAN&gt;'Logon ok'&lt;/SPAN&gt;)&lt;/PRE&gt;
&lt;P&gt;I'm a bit lost how to write this with the auth flow.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P data-unlink="true"&gt;You can see an example of OAuth flows written using our Python SDKs &lt;A href="https://github.com/dropbox/dropbox-sdk-python/blob/main/example/oauth/commandline-oauth.py" target="_self"&gt;here&lt;/A&gt;,&amp;nbsp;and&amp;nbsp;&lt;A href="https://github.com/dropbox/dropbox-sdk-python/blob/main/example/oauth/commandline-oauth-scopes.py" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 21:40:43 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/587298#M27327</guid>
      <dc:creator>tahsini</dc:creator>
      <dc:date>2022-03-30T21:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: dropbox.exceptions.AuthError: expired access token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/587302#M27328</link>
      <description>&lt;P&gt;Dropbox is in the process of switching to only issuing short-lived access tokens (and optional refresh tokens) instead of long-lived access tokens.&amp;nbsp;While the change began on September 30th 2021, we're releasing it gradually, so some users may not have seen app(s) affected until now and the option is available in their app console.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&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. You can find more information in the &lt;A href="https://developers.dropbox.com/oauth-guide" target="_blank" rel="noopener noreferrer"&gt;OAuth Guide&lt;/A&gt; and &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#authorization" target="_blank" rel="noopener noreferrer"&gt;authorization documentation&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 21:44:42 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/dropbox-exceptions-AuthError-expired-access-token/m-p/587302#M27328</guid>
      <dc:creator>tahsini</dc:creator>
      <dc:date>2022-03-30T21:44:42Z</dc:date>
    </item>
  </channel>
</rss>

