<?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 Authorization requires web browser even for dev? in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Authorization-requires-web-browser-even-for-dev/m-p/245149#M13882</link>
    <description>&lt;P&gt;This is painful...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Java examples rely on an auth file created via the Authorization example.&amp;nbsp; Which in turn requires building this code, and running a web browser...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;String authorizeUrl = webAuth.authorize(webAuthRequest);
System.out.println("1. Go to " + authorizeUrl);
System.out.println("2. Click \"Allow\" (you might have to log in first).");
System.out.println("3. Copy the authorization code.");
System.out.print("Enter the authorization code here: ");&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, I can get an auth code for me from DropBox directly, but the&amp;nbsp;DbxAuthInfo structure also requires a non-NULL host.&amp;nbsp; And has no documentation about that.&amp;nbsp; This example doesn't have it either; the user and secret are submitted and the auth code retrieved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/apps/info/" target="_blank" rel="noopener"&gt;https://www.dropbox.com/developers/apps/info/&lt;/A&gt;..., how do I get the host?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Nov 2020 02:12:52 GMT</pubDate>
    <dc:creator>William M.46</dc:creator>
    <dc:date>2020-11-18T02:12:52Z</dc:date>
    <item>
      <title>Authorization requires web browser even for dev?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Authorization-requires-web-browser-even-for-dev/m-p/245149#M13882</link>
      <description>&lt;P&gt;This is painful...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Java examples rely on an auth file created via the Authorization example.&amp;nbsp; Which in turn requires building this code, and running a web browser...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;String authorizeUrl = webAuth.authorize(webAuthRequest);
System.out.println("1. Go to " + authorizeUrl);
System.out.println("2. Click \"Allow\" (you might have to log in first).");
System.out.println("3. Copy the authorization code.");
System.out.print("Enter the authorization code here: ");&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, I can get an auth code for me from DropBox directly, but the&amp;nbsp;DbxAuthInfo structure also requires a non-NULL host.&amp;nbsp; And has no documentation about that.&amp;nbsp; This example doesn't have it either; the user and secret are submitted and the auth code retrieved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/apps/info/" target="_blank" rel="noopener"&gt;https://www.dropbox.com/developers/apps/info/&lt;/A&gt;..., how do I get the host?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 02:12:52 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Authorization-requires-web-browser-even-for-dev/m-p/245149#M13882</guid>
      <dc:creator>William M.46</dc:creator>
      <dc:date>2020-11-18T02:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization requires web browser even for dev?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Authorization-requires-web-browser-even-for-dev/m-p/245177#M13891</link>
      <description>&lt;P&gt;Apologies for the confusion. The DbxHost should identify the Dropbox API servers, but you generally don't need to actually use any of that. You can default to the standard hosts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, you can just use &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.0.x/com/dropbox/core/DbxAppInfo.html#DbxAppInfo-java.lang.String-java.lang.String-" target="_self"&gt;this constructor to make a DbxAppInfo without specifying host&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And outside of the structure of the examples, you really only need the access token, e.g., &lt;A href="https://github.com/dropbox/dropbox-sdk-java/blob/7ecc15cf0f51d6ae2ba5cdb334aac2c2f3474b87/examples/authorize/src/main/java/com/dropbox/core/examples/authorize/Main.java#L90" target="_self"&gt;as acquired here&lt;/A&gt;. You can store and re-use that for future calls.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use that to &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.0.x/com/dropbox/core/v2/DbxClientV2.html#DbxClientV2-com.dropbox.core.DbxRequestConfig-java.lang.String-" target="_self"&gt;make a DbxClientV2 without specifying host using this constructor&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(For reference though, the default DbxHost is &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.0.x/com/dropbox/core/DbxHost.html#DEFAULT" target="_self"&gt;DbxHost.DEFAULT&lt;/A&gt;.)&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 16:44:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Authorization-requires-web-browser-even-for-dev/m-p/245177#M13891</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-10-04T16:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization requires web browser even for dev?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Authorization-requires-web-browser-even-for-dev/m-p/245269#M13904</link>
      <description>&lt;P&gt;Well&amp;nbsp;&lt;STRONG&gt;that&amp;nbsp;&lt;/STRONG&gt;was challenging.&amp;nbsp; &amp;nbsp;That worked but it took a while to realize it. Even though I'd removed the old Dropbox and Jackson (?) JARs from my libraries list, the&amp;nbsp;Jackson one was&amp;nbsp;still in the /lib folder and therefore was apparently being found before the newer Jackson-core (which was also there), resulting in&amp;nbsp;java.lang.NoSuchFieldError: DEFAULT&amp;nbsp;&amp;nbsp;java.lang.reflect.InvocationTargetException and so on.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 03:31:23 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Authorization-requires-web-browser-even-for-dev/m-p/245269#M13904</guid>
      <dc:creator>William M.46</dc:creator>
      <dc:date>2017-10-05T03:31:23Z</dc:date>
    </item>
  </channel>
</rss>

