<?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 Auto authorize with Java client or Mule ESB component in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Auto-authorize-with-Java-client-or-Mule-ESB-component/m-p/100273#M2998</link>
    <description>&lt;P&gt;Is there anyway to provide authorization automatically ?   The usefulness of providing an API to interact with the data store in Dropbox and requiring a manual authorization is zero.&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 09:44:12 GMT</pubDate>
    <dc:creator>Peter K.23</dc:creator>
    <dc:date>2019-05-29T09:44:12Z</dc:date>
    <item>
      <title>Auto authorize with Java client or Mule ESB component</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Auto-authorize-with-Java-client-or-Mule-ESB-component/m-p/100273#M2998</link>
      <description>&lt;P&gt;Is there anyway to provide authorization automatically ?   The usefulness of providing an API to interact with the data store in Dropbox and requiring a manual authorization is zero.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:44:12 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Auto-authorize-with-Java-client-or-Mule-ESB-component/m-p/100273#M2998</guid>
      <dc:creator>Peter K.23</dc:creator>
      <dc:date>2019-05-29T09:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: Auto authorize with Java client or Mule ESB component</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Auto-authorize-with-Java-client-or-Mule-ESB-component/m-p/100274#M2999</link>
      <description>&lt;P&gt;What exactly do you mean by "provide authorization automatically?" You certainly can't access a user's Dropbox without that user's permission.&lt;/P&gt;

&lt;P&gt;The Dropbox API uses OAuth to get a user's permission. Once the user has authorized your app, you can access their Dropbox. Each user of your app should only need to authorize the app once.&lt;/P&gt;</description>
      <pubDate>Sun, 22 Mar 2015 23:17:08 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Auto-authorize-with-Java-client-or-Mule-ESB-component/m-p/100274#M2999</guid>
      <dc:creator>Steve M.</dc:creator>
      <dc:date>2015-03-22T23:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: Auto authorize with Java client or Mule ESB component</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Auto-authorize-with-Java-client-or-Mule-ESB-component/m-p/100275#M3000</link>
      <description>&lt;P&gt;So that clarifies things a bit.  The issue is that it is my drop box and I wanted API access to it.  I was not sure if I had to CONTINUOUSLY allow (which made no sense) and thus it would be crazy to go that route.&lt;/P&gt;

&lt;P&gt;Once I approve access and to that app, then it would work onwards and that makes more sense.  However, executing against a Java client is currently the issue, as I have yet to find a good example that automatically retrieves the auth code such as through an HTTP client and avoid manual interaction from the auth point (after auth is provided from the web console).&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2015 01:13:02 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Auto-authorize-with-Java-client-or-Mule-ESB-component/m-p/100275#M3000</guid>
      <dc:creator>Peter K.23</dc:creator>
      <dc:date>2015-03-23T01:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: Auto authorize with Java client or Mule ESB component</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Auto-authorize-with-Java-client-or-Mule-ESB-component/m-p/100276#M3001</link>
      <description>&lt;P&gt;The tutorial shows how to go through the auth flow in a command-line app (&lt;A href="https://www.dropbox.com/developers/core/start/java" rel="nofollow noreferrer"&gt;https://www.dropbox.com/developers/core/start/java&lt;/A&gt;), and as it says, you can just store the access token for future use:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;The access token is all you'll need to make API requests on behalf of this user, so you should store it away for safe-keeping (even though we don't for this tutorial). By storing the access token, you won't need to go through these steps again unless the user reinstalls your app or revokes access via the Dropbox website.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;If you just need an access token for your own account—no other user will use your app—you can generate an access token directly from the app console: &lt;A href="https://blogs.dropbox.com/developers/2014/05/generate-an-access-token-for-your-own-account/" rel="nofollow noreferrer"&gt;https://blogs.dropbox.com/developers/2014/05/generate-an-access-token-for-your-own-account/&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2015 01:17:11 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Auto-authorize-with-Java-client-or-Mule-ESB-component/m-p/100276#M3001</guid>
      <dc:creator>Steve M.</dc:creator>
      <dc:date>2015-03-23T01:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: Auto authorize with Java client or Mule ESB component</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Auto-authorize-with-Java-client-or-Mule-ESB-component/m-p/100277#M3002</link>
      <description>&lt;P&gt;I did use that example and stored the code from the dropbox site into the app and ran it again:&lt;/P&gt;

&lt;P&gt;//  String code = new BufferedReader(new InputStreamReader(System.in)).readLine().trim();&lt;BR /&gt;
  String code = "cQNNj44-oxgAAAAAAAAJWMnVOFCIlA4xqXbrz56BZPY";&lt;/P&gt;

&lt;P&gt;On the 2nd run, it stated:&lt;/P&gt;

&lt;P&gt;Exception in thread "main" com.dropbox.core.DbxException$BadRequest: {"error_description": "code has already been used", "error": "invalid_grant"}&lt;/P&gt;

&lt;P&gt;Thus, you can't use the code again ?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2015 17:02:03 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Auto-authorize-with-Java-client-or-Mule-ESB-component/m-p/100277#M3002</guid>
      <dc:creator>Peter K.23</dc:creator>
      <dc:date>2015-03-24T17:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: Auto authorize with Java client or Mule ESB component</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Auto-authorize-with-Java-client-or-Mule-ESB-component/m-p/100278#M3003</link>
      <description>&lt;P&gt;The exception is correct... you're trying to reuse an &lt;EM&gt;authorization code&lt;/EM&gt; that's already been used. An authorization code can only be used once (and within a limited time period).&lt;/P&gt;

&lt;P&gt;What you need to do is reuse the &lt;EM&gt;access token&lt;/EM&gt;.&lt;/P&gt;

&lt;P&gt;Once you have an access token, your code can just be this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;DbxClient client = new DbxClient(config, "&amp;lt;YOUR ACCESS TOKEN HERE&amp;gt;");
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Mar 2015 22:43:42 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Auto-authorize-with-Java-client-or-Mule-ESB-component/m-p/100278#M3003</guid>
      <dc:creator>Steve M.</dc:creator>
      <dc:date>2015-03-24T22:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Auto authorize with Java client or Mule ESB component</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Auto-authorize-with-Java-client-or-Mule-ESB-component/m-p/100279#M3004</link>
      <description>&lt;P&gt;Updated the test client as you showed:&lt;/P&gt;

&lt;P&gt;DbxClient client = new DbxClient(config, "&amp;lt;YOUR ACCESS TOKEN HERE&amp;gt;");&lt;/P&gt;

&lt;P&gt;and it worked.  But, you stated:&lt;/P&gt;

&lt;P&gt;"An authorization code can only be used once (and within a limited time period)."  .... does that mean that this auth code will become invalidated in the future ?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2015 18:01:55 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Auto-authorize-with-Java-client-or-Mule-ESB-component/m-p/100279#M3004</guid>
      <dc:creator>Peter K.23</dc:creator>
      <dc:date>2015-03-25T18:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: Auto authorize with Java client or Mule ESB component</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Auto-authorize-with-Java-client-or-Mule-ESB-component/m-p/100280#M3005</link>
      <description>&lt;P&gt;"Authorization code" and "access token" are two different things.&lt;/P&gt;

&lt;P&gt;You were trying to reuse an authorization code, which won't work.&lt;/P&gt;

&lt;P&gt;Now you're reusing an access token, which &lt;EM&gt;will&lt;/EM&gt; work. (Access tokens are meant to be reused indefinitely.)&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2015 22:06:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Auto-authorize-with-Java-client-or-Mule-ESB-component/m-p/100280#M3005</guid>
      <dc:creator>Steve M.</dc:creator>
      <dc:date>2015-03-25T22:06:05Z</dc:date>
    </item>
  </channel>
</rss>

