<?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 authenticate example using javascript sdk problem in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/authenticate-example-using-javascript-sdk-problem/m-p/202476#M9616</link>
    <description>&lt;P&gt;When using javascript sdk,&lt;/P&gt;&lt;P&gt;I download &lt;SPAN class="repo-root js-repo-root"&gt;&lt;SPAN class="js-path-segment"&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-js" target="_blank"&gt;&lt;SPAN&gt;dropbox-sdk-js&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="separator"&gt;/&lt;/SPAN&gt;&lt;SPAN class="js-path-segment"&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-js/tree/master/examples" target="_blank"&gt;&lt;SPAN&gt;examples&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN class="separator"&gt;/&lt;/SPAN&gt;&lt;STRONG&gt;auth&lt;/STRONG&gt;&lt;SPAN class="separator"&gt;/&lt;/SPAN&gt;index.html,&lt;/P&gt;&lt;P&gt;put Dropbox-sdk.min.js, styles.css, utils.js to the same folder,&lt;/P&gt;&lt;P&gt;modify these three file's location in index.html,&lt;/P&gt;&lt;PRE&gt;&amp;lt;head&amp;gt;
  &amp;lt;title&amp;gt;Dropbox JavaScript SDK&amp;lt;/title&amp;gt;
  &amp;lt;link rel="stylesheet" href="styles.css"&amp;gt;
  &amp;lt;script src="Dropbox-sdk.min.js"&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;script src="utils.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;&lt;/PRE&gt;&lt;P&gt;open index.html will see:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://dl.dropboxusercontent.com/u/3093457/dropbox_api/auth/01.jpg" border="0" alt="" width="759" height="405" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;after click Authenticate:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://dl.dropboxusercontent.com/u/3093457/dropbox_api/auth/02.jpg" border="0" alt="" width="759" height="405" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;after click allow:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://dl.dropboxusercontent.com/u/3093457/dropbox_api/auth/03.jpg" border="0" alt="" width="759" height="405" /&gt;&lt;/P&gt;&lt;P&gt;Please help how the javascript sdk get the root file list after authentication?&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 09:26:41 GMT</pubDate>
    <dc:creator>cris122</dc:creator>
    <dc:date>2019-05-29T09:26:41Z</dc:date>
    <item>
      <title>authenticate example using javascript sdk problem</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/authenticate-example-using-javascript-sdk-problem/m-p/202476#M9616</link>
      <description>&lt;P&gt;When using javascript sdk,&lt;/P&gt;&lt;P&gt;I download &lt;SPAN class="repo-root js-repo-root"&gt;&lt;SPAN class="js-path-segment"&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-js" target="_blank"&gt;&lt;SPAN&gt;dropbox-sdk-js&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="separator"&gt;/&lt;/SPAN&gt;&lt;SPAN class="js-path-segment"&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-js/tree/master/examples" target="_blank"&gt;&lt;SPAN&gt;examples&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN class="separator"&gt;/&lt;/SPAN&gt;&lt;STRONG&gt;auth&lt;/STRONG&gt;&lt;SPAN class="separator"&gt;/&lt;/SPAN&gt;index.html,&lt;/P&gt;&lt;P&gt;put Dropbox-sdk.min.js, styles.css, utils.js to the same folder,&lt;/P&gt;&lt;P&gt;modify these three file's location in index.html,&lt;/P&gt;&lt;PRE&gt;&amp;lt;head&amp;gt;
  &amp;lt;title&amp;gt;Dropbox JavaScript SDK&amp;lt;/title&amp;gt;
  &amp;lt;link rel="stylesheet" href="styles.css"&amp;gt;
  &amp;lt;script src="Dropbox-sdk.min.js"&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;script src="utils.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;&lt;/PRE&gt;&lt;P&gt;open index.html will see:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://dl.dropboxusercontent.com/u/3093457/dropbox_api/auth/01.jpg" border="0" alt="" width="759" height="405" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;after click Authenticate:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://dl.dropboxusercontent.com/u/3093457/dropbox_api/auth/02.jpg" border="0" alt="" width="759" height="405" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;after click allow:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://dl.dropboxusercontent.com/u/3093457/dropbox_api/auth/03.jpg" border="0" alt="" width="759" height="405" /&gt;&lt;/P&gt;&lt;P&gt;Please help how the javascript sdk get the root file list after authentication?&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:26:41 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/authenticate-example-using-javascript-sdk-problem/m-p/202476#M9616</guid>
      <dc:creator>cris122</dc:creator>
      <dc:date>2019-05-29T09:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: authenticate example using javascript sdk problem</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/authenticate-example-using-javascript-sdk-problem/m-p/202564#M9629</link>
      <description>&lt;P&gt;Hi Cris, based on your first screenshot, it appears you're running the sample from a file:/// URL. These samples are built to run from a local server though, in order to handle the redirect from the app authorizatin flow. Without a local server running, you'll get the error in your last screenshot, as there's no server to handle the redirect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The instructions for running the examples can be found here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-js/tree/master/examples" target="_blank"&gt;https://github.com/dropbox/dropbox-sdk-js/tree/master/examples&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;That covers using `npm start` to run the local server for you. Please try those instructions to get this running.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2017 19:31:55 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/authenticate-example-using-javascript-sdk-problem/m-p/202564#M9629</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-01-17T19:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: authenticate example using javascript sdk problem</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/authenticate-example-using-javascript-sdk-problem/m-p/202646#M9645</link>
      <description>&lt;P&gt;Hi Greg,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;I install a new ubuntu 16.04 system on virtualbox and install npm,&lt;/P&gt;&lt;P&gt;I found there is a problem when execute npm start:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;root@cris-VirtualBox:~/dropbox-sdk-js# npm start

&amp;gt; dropbox@2.5.0 start /root/dropbox-sdk-js
&amp;gt; node examples/server.js

sh: 1: node: not found&lt;/PRE&gt;&lt;P&gt;command "node" is not found,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;root@cris-VirtualBox:~/dropbox-sdk-js# nodejs examples/server.js &lt;/PRE&gt;&lt;P&gt;instead and it works well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In virtualbox ubuntu open firefox and open &lt;A href="http://0.0.0.0:8080" target="_blank"&gt;http://0.0.0.0:8080&lt;/A&gt; could authenticate and get the root directory file list.&lt;/P&gt;&lt;P&gt;But in windows(both in the same local network) still can't get redirect link&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;click Authentication example&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://dl.dropboxusercontent.com/u/3093457/dropbox_api/auth/test2/01.jpg" border="0" alt="" width="1026" height="547" /&gt;&lt;/P&gt;&lt;P&gt;click Authenticate&lt;IMG src="https://dl.dropboxusercontent.com/u/3093457/dropbox_api/auth/test2/02.jpg" border="0" alt="" width="1026" height="547" /&gt;&lt;/P&gt;&lt;P&gt;click Allow&lt;IMG src="https://dl.dropboxusercontent.com/u/3093457/dropbox_api/auth/test2/03.jpg" border="0" alt="" width="1026" height="547" /&gt;&lt;/P&gt;&lt;P&gt;get redirect link&lt;IMG src="https://dl.dropboxusercontent.com/u/3093457/dropbox_api/auth/test2/04.jpg" border="0" alt="" width="1026" height="547" /&gt;&lt;/P&gt;&lt;P&gt;My product is like a wifi router, or nas, user can use browser to open product setting page if via local network, and needs to get dropbox authentication on the setting page.&lt;/P&gt;&lt;P&gt;After authentication, users can sync files or event to dropbox.&lt;/P&gt;&lt;P&gt;I think I could not request users install a web server on their os like windows.&lt;/P&gt;&lt;P&gt;Use a public server is the last resort because it needs additional cost.&lt;/P&gt;&lt;P&gt;Would you please provide some suggestions?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2017 10:33:00 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/authenticate-example-using-javascript-sdk-problem/m-p/202646#M9645</guid>
      <dc:creator>cris122</dc:creator>
      <dc:date>2017-01-18T10:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: authenticate example using javascript sdk problem</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/authenticate-example-using-javascript-sdk-problem/m-p/202723#M9649</link>
      <description>&lt;P&gt;The sample uses a localhost redirect URI by default, but you can change that to be whatever you need. That's done here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-js/blob/05e8ff949ab352ab5a483507222f17231e3b4d9d/examples/auth/index.html#L89" target="_blank"&gt;https://github.com/dropbox/dropbox-sdk-js/blob/05e8ff949ab352ab5a483507222f17231e3b4d9d/examples/auth/index.html#L89&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Per the other screenshots, you're using a 1.1.1.58:8080 redirect URI.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You'll also need to switch in your own client ID a.k.a. app key:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-js/blob/05e8ff949ab352ab5a483507222f17231e3b4d9d/examples/auth/index.html#L42" target="_blank"&gt;https://github.com/dropbox/dropbox-sdk-js/blob/05e8ff949ab352ab5a483507222f17231e3b4d9d/examples/auth/index.html#L42&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And make sure you register your redirect URI(s) on your app's page on the App Console:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/developers/apps" target="_blank"&gt;https://www.dropbox.com/developers/apps&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When implementing your actual app, you can similarly specify whatever redirect URI you want, as long as you pre-register it on the App Console.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2017 18:39:26 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/authenticate-example-using-javascript-sdk-problem/m-p/202723#M9649</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-01-18T18:39:26Z</dc:date>
    </item>
  </channel>
</rss>

