<?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 Dropbox Bearer token is too short in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-Bearer-token-is-too-short/m-p/417018#M22457</link>
    <description>&lt;P&gt;When I log in to DropBox, I get approved and receive my auth token. But, the token is too short!&lt;/P&gt;
&lt;P&gt;I should receive : "################################-###############################"&lt;/P&gt;
&lt;P&gt;but I get :&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"###################-#######################"&lt;/P&gt;
&lt;P&gt;This returns a "&lt;SPAN&gt;invalid_access_token&lt;/SPAN&gt;" error.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is my layout for&amp;nbsp;passport-dropbox-oauth2:&lt;/P&gt;
&lt;P&gt;app.get('/dropboxLogin', passport.authenticate('dropbox-oauth2'));&lt;/P&gt;
&lt;P&gt;app.get('/auth/dropbox/callback',&lt;BR /&gt;passport.authenticate('dropbox-oauth2', { failureRedirect: '/' }),&lt;BR /&gt;function(req, res)&lt;BR /&gt;{&lt;BR /&gt;// Successful authentication, redirect home.&lt;BR /&gt;res.render('index', { title:'Dropbox Login', body:res});&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;app.get('/loggedIn', function(req,res)&lt;BR /&gt;{&lt;BR /&gt;//have bearer token&lt;BR /&gt;let token = req.query.code;&lt;BR /&gt;console.log(req.query);&lt;BR /&gt;res.redirect('/Callback/?token='+token);&lt;BR /&gt;});&lt;/P&gt;</description>
    <pubDate>Mon, 04 May 2020 19:45:57 GMT</pubDate>
    <dc:creator>TheKrominator</dc:creator>
    <dc:date>2020-05-04T19:45:57Z</dc:date>
    <item>
      <title>Dropbox Bearer token is too short</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-Bearer-token-is-too-short/m-p/417018#M22457</link>
      <description>&lt;P&gt;When I log in to DropBox, I get approved and receive my auth token. But, the token is too short!&lt;/P&gt;
&lt;P&gt;I should receive : "################################-###############################"&lt;/P&gt;
&lt;P&gt;but I get :&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"###################-#######################"&lt;/P&gt;
&lt;P&gt;This returns a "&lt;SPAN&gt;invalid_access_token&lt;/SPAN&gt;" error.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is my layout for&amp;nbsp;passport-dropbox-oauth2:&lt;/P&gt;
&lt;P&gt;app.get('/dropboxLogin', passport.authenticate('dropbox-oauth2'));&lt;/P&gt;
&lt;P&gt;app.get('/auth/dropbox/callback',&lt;BR /&gt;passport.authenticate('dropbox-oauth2', { failureRedirect: '/' }),&lt;BR /&gt;function(req, res)&lt;BR /&gt;{&lt;BR /&gt;// Successful authentication, redirect home.&lt;BR /&gt;res.render('index', { title:'Dropbox Login', body:res});&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;app.get('/loggedIn', function(req,res)&lt;BR /&gt;{&lt;BR /&gt;//have bearer token&lt;BR /&gt;let token = req.query.code;&lt;BR /&gt;console.log(req.query);&lt;BR /&gt;res.redirect('/Callback/?token='+token);&lt;BR /&gt;});&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 19:45:57 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-Bearer-token-is-too-short/m-p/417018#M22457</guid>
      <dc:creator>TheKrominator</dc:creator>
      <dc:date>2020-05-04T19:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Dropbox Bearer token is too short</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-Bearer-token-is-too-short/m-p/417033#M22458</link>
      <description>&lt;P&gt;It sounds like you're using the "code" flow, so&amp;nbsp;Dropbox will return an "authorization code", not an access token. When using the code flow, once you&amp;nbsp;receive the authorization code, you need to then exchange it for an access token using&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#oauth2-token" target="_self"&gt;/oauth2/token&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check out the&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#oauth2-authorize" target="_self"&gt;/oauth2/authorize&lt;/A&gt; and&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#oauth2-token" target="_self"&gt;/oauth2/token&lt;/A&gt;&amp;nbsp;documentation for more information on how this works.&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 19:55:50 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-Bearer-token-is-too-short/m-p/417033#M22458</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-05-04T19:55:50Z</dc:date>
    </item>
  </channel>
</rss>

