<?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 Javascript SDK + Auth0 access token gives invalid_access_token error in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-Javascript-SDK-Auth0-access-token-gives-invalid-access/m-p/336602#M19598</link>
    <description>&lt;P&gt;Oh my, let me begin:&lt;/P&gt;&lt;P&gt;What I have working:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Auth0 application created and connected to dropbox. The 'Try' option successfully gives me access to my app folder on a user's dropbox account. Great&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/9177iFCC707F3A709A3C9/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;I have setup my Dropbox App on my dropbox developer site and it worked previously to create folders, upload files, and read from folders.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I changed my app from using a single access code (mine generated from my developer website), to authenticate users using Auth0.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 377px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/9178iD5EFC5E4FC790AF0/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The image below fails (using the Auth0 accessToken returned to create a new Dropbox client using the Dropbox Javascript SDK)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 462px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/9179i9FFABFA07C48D9E3/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Using the accessToken returned from Auth0 after successfully authenticating a user and after the user grants my app access to their dropbox site, using the Auth0 accessToken&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&amp;nbsp;to create a new instance of the Dropbox client (Dropbox SDK for Javascript) works&lt;/LI&gt;&lt;LI&gt;to &lt;STRONG&gt;call&lt;/STRONG&gt; &lt;STRONG&gt;filesCreateFolderV2() or any other api methods fail &lt;/STRONG&gt;with an &lt;STRONG&gt;'invalid_access_token' error&lt;/STRONG&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Please helppppppp.&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 09:07:09 GMT</pubDate>
    <dc:creator>chibuzor</dc:creator>
    <dc:date>2019-05-29T09:07:09Z</dc:date>
    <item>
      <title>Dropbox Javascript SDK + Auth0 access token gives invalid_access_token error</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-Javascript-SDK-Auth0-access-token-gives-invalid-access/m-p/336602#M19598</link>
      <description>&lt;P&gt;Oh my, let me begin:&lt;/P&gt;&lt;P&gt;What I have working:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Auth0 application created and connected to dropbox. The 'Try' option successfully gives me access to my app folder on a user's dropbox account. Great&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/9177iFCC707F3A709A3C9/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;I have setup my Dropbox App on my dropbox developer site and it worked previously to create folders, upload files, and read from folders.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I changed my app from using a single access code (mine generated from my developer website), to authenticate users using Auth0.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 377px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/9178iD5EFC5E4FC790AF0/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The image below fails (using the Auth0 accessToken returned to create a new Dropbox client using the Dropbox Javascript SDK)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 462px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/9179i9FFABFA07C48D9E3/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Using the accessToken returned from Auth0 after successfully authenticating a user and after the user grants my app access to their dropbox site, using the Auth0 accessToken&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&amp;nbsp;to create a new instance of the Dropbox client (Dropbox SDK for Javascript) works&lt;/LI&gt;&lt;LI&gt;to &lt;STRONG&gt;call&lt;/STRONG&gt; &lt;STRONG&gt;filesCreateFolderV2() or any other api methods fail &lt;/STRONG&gt;with an &lt;STRONG&gt;'invalid_access_token' error&lt;/STRONG&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Please helppppppp.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:07:09 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-Javascript-SDK-Auth0-access-token-gives-invalid-access/m-p/336602#M19598</guid>
      <dc:creator>chibuzor</dc:creator>
      <dc:date>2019-05-29T09:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Dropbox Javascript SDK + Auth0 access token gives invalid_access_token error</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-Javascript-SDK-Auth0-access-token-gives-invalid-access/m-p/337022#M19620</link>
      <description>&lt;P&gt;We can't offer help with Auth0 itself, but we'll be happy to help with the&amp;nbsp;Dropbox side of things.&lt;/P&gt;
&lt;P&gt;An OAuth 2 access token for the&amp;nbsp;Dropbox API should work the same way regardless of exactly where/how you get it (e.g., from the app's info page on&amp;nbsp;Dropbox App Console, or from the actual&amp;nbsp;Dropbox OAuth app authorization page), as long as it is in fact an access token&amp;nbsp;received from Dropbox, and it hasn't been revoked.&lt;/P&gt;
&lt;P&gt;Can you print out and inspect the "this.auth.accessToken" value to see what it is? (Don't post it here if it does look like an access token though.)&lt;/P&gt;
&lt;P&gt;For instance, make sure that the&amp;nbsp;Dropbox OAuth app authorization flow completed successfully and the resulting access token string was saved in that variable.&lt;/P&gt;
&lt;P&gt;I see that you are setting "responseType" to "token id_token", but if that is the value used for &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#oauth2-authorize" target="_self"&gt;the&amp;nbsp;Dropbox /oauth2/authorize page&lt;/A&gt;, that should just be "token". Likewise, &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#oauth2-authorize" target="_self"&gt;the&amp;nbsp;Dropbox&amp;nbsp;/oauth2/authorize page&lt;/A&gt; doesn't currently take "scope" or "domain" parameters.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 20:38:25 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-Javascript-SDK-Auth0-access-token-gives-invalid-access/m-p/337022#M19620</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2019-04-01T20:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Dropbox Javascript SDK + Auth0 access token gives invalid_access_token error</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-Javascript-SDK-Auth0-access-token-gives-invalid-access/m-p/337069#M19623</link>
      <description>&lt;P&gt;So I fixed my issue but not in the way I would expect.&lt;/P&gt;&lt;P&gt;I thought Auth0 and Dropbox were streamlined but the 'token' Auth0 returns after authenticating with dropbox is different from the 'code'/'token' that the Dropbox API returns after authenticating.&lt;/P&gt;&lt;P&gt;So to get it to work, I had to essentially follow all of the Dropbox API steps and ignore authenticating using the Auth0 Typescript SDK.&lt;/P&gt;&lt;P&gt;Thank you Greg for your help with this. This link helped a lot and started to make more sense after I had tried MANY different approaches:&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#oauth2-authorize" target="_blank"&gt;https://www.dropbox.com/developers/documentation/http/documentation#oauth2-authorize&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Feel free to ping me if anyone on the forums need help authenticating with the Dropbox API. I might be able to share my usecase and help them through.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2019 06:38:06 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-Javascript-SDK-Auth0-access-token-gives-invalid-access/m-p/337069#M19623</guid>
      <dc:creator>chibuzor</dc:creator>
      <dc:date>2019-04-02T06:38:06Z</dc:date>
    </item>
  </channel>
</rss>

