<?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: Access Token Changes Every time I use it in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-Token-Changes-Every-time-I-use-it/m-p/131352#M3839</link>
    <description>&lt;P&gt;What do you mean when you say the access token changes after every use? Do you mean you're clicking the Generate button each time you need an access token?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Access tokens don't expire by themselves (though they can be manually revoked), so once you generate one for your account, you can store and re-use it programmatically in the future, without generating a new one.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Oct 2015 01:08:04 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2015-10-21T01:08:04Z</dc:date>
    <item>
      <title>Access Token Changes Every time I use it</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-Token-Changes-Every-time-I-use-it/m-p/131351#M3838</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm working on a DIY motion detection project with a raspberry pi and I was able to save image files to my dropbox by using the generated access token (which is ridiculously long btw). My issue is that the token changes after every use. Is there a way to get a permanent access code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Dan&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:39:11 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-Token-Changes-Every-time-I-use-it/m-p/131351#M3838</guid>
      <dc:creator>Daniel J.18</dc:creator>
      <dc:date>2019-05-29T09:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: Access Token Changes Every time I use it</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-Token-Changes-Every-time-I-use-it/m-p/131352#M3839</link>
      <description>&lt;P&gt;What do you mean when you say the access token changes after every use? Do you mean you're clicking the Generate button each time you need an access token?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Access tokens don't expire by themselves (though they can be manually revoked), so once you generate one for your account, you can store and re-use it programmatically in the future, without generating a new one.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2015 01:08:04 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-Token-Changes-Every-time-I-use-it/m-p/131352#M3839</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-10-21T01:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Access Token Changes Every time I use it</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-Token-Changes-Every-time-I-use-it/m-p/131353#M3840</link>
      <description>&lt;DIV&gt;Originally I was using this code to upload to my dropbox folder...&lt;/DIV&gt;
&lt;DIV&gt;---------------&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;from dropbox.client import DropboxOAuth2FlowNoRedirect&lt;/DIV&gt;
&lt;DIV&gt;from dropbox.client import DropboxClient&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;if conf["use_dropbox"]:&lt;/DIV&gt;
&lt;DIV&gt;# connect to dropbox and start the session authorization process&lt;/DIV&gt;
&lt;DIV&gt;flow = DropboxOAuth2FlowNoRedirect(conf["dropbox_key"], conf["dropbox_secret"])&lt;/DIV&gt;
&lt;DIV&gt;print "[INFO] Authorize this application: {}".format(flow.start())&lt;/DIV&gt;
&lt;DIV&gt;authCode = raw_input("Enter auth code here: ").strip()&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;# finish the authorization and grab the Dropbox client&lt;/DIV&gt;
&lt;DIV&gt;(accessToken, userID) = flow.finish(authCode)&lt;/DIV&gt;
&lt;DIV&gt;client = DropboxClient(accessToken)&lt;/DIV&gt;
&lt;DIV&gt;print "[SUCCESS] dropbox account linked"&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;---------------&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;With this, every time I ran the code, It would ask me to enter the dropbox link into my URL, enter my dropbox email and password, and then it would give me the access token.&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I tried replacing the lines asking for the token with the token hard coded in...&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;print "[INFO] Authorize this application: {}".format(flow.start())&lt;/DIV&gt;
&lt;DIV&gt;authCode = raw_input("Enter auth code here: ").strip()&lt;/DIV&gt;
&lt;DIV&gt;with&lt;/DIV&gt;
&lt;DIV&gt;authCode = ("ACCESS_TOKEN_HERE")&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;This worked once but then fails when I try to run the program again and I need to get another token.&lt;/DIV&gt;</description>
      <pubDate>Wed, 21 Oct 2015 02:58:44 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-Token-Changes-Every-time-I-use-it/m-p/131353#M3840</guid>
      <dc:creator>Daniel J.18</dc:creator>
      <dc:date>2015-10-21T02:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: Access Token Changes Every time I use it</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-Token-Changes-Every-time-I-use-it/m-p/131354#M3841</link>
      <description>&lt;P&gt;Thanks for clarifying. The code you're referring to is an authorization code, not an access token. Authorization codes are temporary, and can only be used once. So, instead of trying to re-use an authorization code or authorizing the app each time, you should store and re-use the resulting access token, passing it directly to the&amp;nbsp;DropboxClient constructor.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2015 03:01:32 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-Token-Changes-Every-time-I-use-it/m-p/131354#M3841</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-10-21T03:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Access Token Changes Every time I use it</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-Token-Changes-Every-time-I-use-it/m-p/131355#M3842</link>
      <description>&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It worked!&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2015 03:12:29 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-Token-Changes-Every-time-I-use-it/m-p/131355#M3842</guid>
      <dc:creator>Daniel J.18</dc:creator>
      <dc:date>2015-10-21T03:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Access Token Changes Every time I use it</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-Token-Changes-Every-time-I-use-it/m-p/131356#M3843</link>
      <description>&lt;P&gt;Are you really sure that access token will not expire at all. How do I can see the old access tokens ?&lt;/P&gt;
&lt;P&gt;Or Can I request token via client api along with the old one?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2016 21:51:34 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-Token-Changes-Every-time-I-use-it/m-p/131356#M3843</guid>
      <dc:creator>c. chunta</dc:creator>
      <dc:date>2016-06-01T21:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: Access Token Changes Every time I use it</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-Token-Changes-Every-time-I-use-it/m-p/131357#M3844</link>
      <description>&lt;P&gt;c. chunta,&amp;nbsp;correct, access tokens don't expire.&lt;/P&gt;
&lt;P&gt;You need to store the access token yourself to keep using it. There's no way to ask Dropbox for&amp;nbsp;previous access tokens, but you can always get a new access token by taking a user&amp;nbsp;through the OAuth flow.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2016 23:07:25 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-Token-Changes-Every-time-I-use-it/m-p/131357#M3844</guid>
      <dc:creator>Steve M.</dc:creator>
      <dc:date>2016-06-01T23:07:25Z</dc:date>
    </item>
  </channel>
</rss>

