<?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 Re: .NET SDK System.AggregateException OAuth 2 access token is malformed  ? in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/NET-SDK-System-AggregateException-OAuth-2-access-token-is/m-p/177427#M7099</link>
    <description>&lt;P&gt;Gregory, thank you. &amp;nbsp; much appreciated. &amp;nbsp;issue is resolved.&lt;/P&gt;</description>
    <pubDate>Wed, 20 Jul 2016 02:18:47 GMT</pubDate>
    <dc:creator>LOWRY G.</dc:creator>
    <dc:date>2016-07-20T02:18:47Z</dc:date>
    <item>
      <title>.NET SDK System.AggregateException OAuth 2 access token is malformed  ?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/NET-SDK-System-AggregateException-OAuth-2-access-token-is/m-p/177425#M7097</link>
      <description>&lt;P&gt;Message=Error in call to API function "users/get_current_account":&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &lt;STRONG&gt;The given OAuth 2 access token is malformed&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/developers/documentation/dotnet#tutorial" rel="nofollow noreferrer" target="_blank"&gt;https://www.dropbox.com/developers/documentation/dotnet#tutorial&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;(a) installed Dropbox .NET SDK via NuGet&lt;/P&gt;
&lt;P&gt;(b) registered Dropbox API app using the "App Console"&lt;/P&gt;
&lt;P&gt;(c) copied this text from the .NET tutorial page mention above.&lt;/P&gt;
&lt;P&gt;(d) replaced "YOUR ACCESS TOKEN" in the line below with the App key from step (b) above:&lt;/P&gt;
&lt;PRE class="dbprettyprint literal-block prettyprint lang-None"&gt;&lt;SPAN class="kwd"&gt;using&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;var&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; dbx &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt; &lt;SPAN class="kwd"&gt;new&lt;/SPAN&gt; &lt;SPAN class="typ"&gt;DropboxClient&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"&lt;STRONG&gt;YOUR ACCESS TOKEN&lt;/STRONG&gt;"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;))&lt;BR /&gt;&lt;BR /&gt;(e) the code compiles BUT crashes on the line after the using:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;PRE class="dbprettyprint literal-block prettyprint lang-None"&gt;&lt;SPAN class="kwd"&gt;var&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; full &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; await dbx&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Users&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;GetCurrentAccountAsync&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;();&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;PRE class="dbprettyprint literal-block prettyprint lang-None"&gt;&lt;SPAN class="pun"&gt;The ERROR is:&lt;BR /&gt;&lt;BR /&gt;Message=Error in call to API function&lt;BR /&gt; "users/get_current_account":&lt;BR /&gt; The given OAuth 2 access token is malformed."&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;The app key provided by the Dropbox App Console&lt;BR /&gt;is 15 alphanumeric characters with this form:&lt;/P&gt;
&lt;P&gt;aannnaaaaaaaana&lt;/P&gt;
&lt;P&gt;How can it be malformed when it was copied and pasted&lt;BR /&gt;from the middle of a page with an URL that even contained&lt;BR /&gt;the App key as part of the URL:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/developers/apps/info/aannnaaaaaaaana" rel="nofollow noreferrer" target="_blank"&gt;https://www.dropbox.com/developers/apps/info/aannnaaaaaaaana&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The outer exception is:&lt;/P&gt;
&lt;P&gt;System.AggregateException was unhandled&lt;BR /&gt; HResult=-2146233088&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:31:37 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/NET-SDK-System-AggregateException-OAuth-2-access-token-is/m-p/177425#M7097</guid>
      <dc:creator>LOWRY G.</dc:creator>
      <dc:date>2019-05-29T09:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: .NET SDK System.AggregateException OAuth 2 access token is malformed  ?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/NET-SDK-System-AggregateException-OAuth-2-access-token-is/m-p/177426#M7098</link>
      <description>&lt;P&gt;[Cross-linking for reference:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/38462091/net-sdk-system-aggregateexception-oauth-2-access-token-is-malformed" rel="nofollow noreferrer"&gt;https://stackoverflow.com/questions/38462091/net-sdk-system-aggregateexception-oauth-2-access-token-is-malformed&lt;/A&gt; ]&lt;/P&gt;
&lt;P&gt;It looks like you're using your app's "app key", instead of an "access token". These are different from each other. The app key identifies your app, whereas an access token identifies an app-user pair, and allows access to that user's account.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can generate an access token for your app on your account on the app's page on the &lt;A href="https://www.dropbox.com/developers/apps" target="_blank" rel="nofollow noreferrer"&gt;App Console&lt;/A&gt;, using the "Generate" button.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 01:46:35 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/NET-SDK-System-AggregateException-OAuth-2-access-token-is/m-p/177426#M7098</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-07-20T01:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: .NET SDK System.AggregateException OAuth 2 access token is malformed  ?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/NET-SDK-System-AggregateException-OAuth-2-access-token-is/m-p/177427#M7099</link>
      <description>&lt;P&gt;Gregory, thank you. &amp;nbsp; much appreciated. &amp;nbsp;issue is resolved.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 02:18:47 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/NET-SDK-System-AggregateException-OAuth-2-access-token-is/m-p/177427#M7099</guid>
      <dc:creator>LOWRY G.</dc:creator>
      <dc:date>2016-07-20T02:18:47Z</dc:date>
    </item>
  </channel>
</rss>

