<?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: Getting &amp;quot;invalid_token './' &amp;quot; after copying User Token in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-quot-invalid-token-quot-after-copying-User-Token/m-p/172094#M6541</link>
    <description>&lt;P&gt;Finally! Apparently the variable "UserToken" contained the user authorization code and not the user token. I added this line:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Dim t = Await DropboxOAuth2Helper.ProcessCodeFlowAsync(UserToken, "app_id", "app_secret")&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;And I got the &lt;EM&gt;"AccessToken"&amp;nbsp;&lt;/EM&gt;from the &lt;EM&gt;"t"&amp;nbsp;&lt;/EM&gt;variable.&lt;/P&gt;
&lt;P&gt;Thanks for the help.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jun 2016 06:53:11 GMT</pubDate>
    <dc:creator>Victor C.17</dc:creator>
    <dc:date>2016-06-23T06:53:11Z</dc:date>
    <item>
      <title>Getting "invalid_token './' " after copying User Token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-quot-invalid-token-quot-after-copying-User-Token/m-p/172090#M6537</link>
      <description>&lt;P&gt;I'm making a program in VB.Net and I have&amp;nbsp;a form to paste the user Token but when I click "Ok" an error is displayed. It says: "invalid_token './'".&lt;/P&gt;
&lt;P&gt;This is my code:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Private Async Function GetUserData() As Task&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; Try&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; If UserToken = Nothing Then&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; Dim enable As New EnableDropBox&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; If enable.ShowDialog = Windows.Forms.DialogResult.OK Then&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; UserToken = enable.AccessToken&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; Dim dbx As New DropboxClient(UserToken)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; Dim full = Await dbx.Users.GetCurrentAccountAsync()&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; Me.Text = Application.ProductName &amp;amp; " [" &amp;amp; full.Email &amp;amp; "]"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; RibbonTextBox1.TextBoxText = full.Email&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; RibbonTextBox2.TextBoxText = Split(full.AccountType.ToString, "+")(1)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; SaveSetting(Application.ProductName, "Cloud", "Dropbox", UserToken)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; End If&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; Else&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; Dim dbx As New DropboxClient(UserToken)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; Dim full = Await dbx.Users.GetCurrentAccountAsync()&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; Me.Text = Application.ProductName &amp;amp; " [" &amp;amp; full.Email &amp;amp; "]"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; RibbonTextBox1.TextBoxText = full.Email&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; RibbonTextBox2.TextBoxText = Split(full.AccountType.ToString, "+")(1)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; End If&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; Catch ex As Exception&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; MsgBox(ex.Message, MsgBoxStyle.Critical, "Dropbox")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; End Try&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; End Function&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;And the "EnableDropBox" form code is:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Imports Dropbox.Api&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Public Class EnableDropBox&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Public Property AccessToken As String = Nothing&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; Dim oauth As Uri = DropboxOAuth2Helper.GetAuthorizeUri("the_app_code", False)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; Process.Start(oauth.ToString)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; AccessToken = InputBox("Paste the authorization code::", "Dropbox", Nothing)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; If AccessToken = Nothing Then&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; MsgBox("Unauthorized communication with Dropbox", MsgBoxStyle.Exclamation, "Dropbox")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; Me.DialogResult = Windows.Forms.DialogResult.Cancel&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; Else&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; Me.DialogResult = Windows.Forms.DialogResult.OK&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; End If&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; End Sub&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;End Class&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Note: I have activated the app for 500 users only for testing.&lt;/P&gt;
&lt;P&gt;Note 2: I am using the Api 3.2.1&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:32:31 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-quot-invalid-token-quot-after-copying-User-Token/m-p/172090#M6537</guid>
      <dc:creator>Victor C.17</dc:creator>
      <dc:date>2019-05-29T09:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Getting "invalid_token './' " after copying User Token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-quot-invalid-token-quot-after-copying-User-Token/m-p/172091#M6538</link>
      <description>&lt;P&gt;What line is producing that error? Can you add some logic and logging to check the value for the token you're sending up? Based on the error, it appears you're sending up the string './', which isn't a valid token.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 01:11:53 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-quot-invalid-token-quot-after-copying-User-Token/m-p/172091#M6538</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-06-23T01:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Getting "invalid_token './' " after copying User Token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-quot-invalid-token-quot-after-copying-User-Token/m-p/172092#M6539</link>
      <description>&lt;P&gt;The async function&amp;nbsp;shows no error line.&lt;/P&gt;
&lt;P&gt;If I set a MsgBox like: &lt;EM&gt;MsgBox(UserToken)&amp;nbsp;&lt;/EM&gt;it shows exactly the code I just paste in the InputBox.&lt;/P&gt;
&lt;P&gt;I noticed that my token is 64 charactes lenght and the user token is&amp;nbsp;almost 10 characters less or something like that.&amp;nbsp;Do I need to add the application code or something?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 05:22:35 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-quot-invalid-token-quot-after-copying-User-Token/m-p/172092#M6539</guid>
      <dc:creator>Victor C.17</dc:creator>
      <dc:date>2016-06-23T05:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: Getting "invalid_token './' " after copying User Token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-quot-invalid-token-quot-after-copying-User-Token/m-p/172093#M6540</link>
      <description>&lt;P&gt;I'm not sure I understand your question. Your app should use your "app key", also known as "client ID", to get the authorization URL, and send the user there. The user then gets an "authorization code" from Dropbox, and gives it back to your app. Your app should then exchange that authorization code for the access token for that user. (The authorization code is not the same as the access token.)&lt;/P&gt;
&lt;P&gt;I&amp;nbsp;recommend following the documentation here that shows how to process this using the&amp;nbsp;Dropbox .NET SDK:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/T_Dropbox_Api_DropboxOAuth2Helper.htm" rel="nofollow noreferrer"&gt;https://dropbox.github.io/dropbox-sdk-dotnet/html/T_Dropbox_Api_DropboxOAuth2Helper.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 05:54:45 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-quot-invalid-token-quot-after-copying-User-Token/m-p/172093#M6540</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-06-23T05:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Getting "invalid_token './' " after copying User Token</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-quot-invalid-token-quot-after-copying-User-Token/m-p/172094#M6541</link>
      <description>&lt;P&gt;Finally! Apparently the variable "UserToken" contained the user authorization code and not the user token. I added this line:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Dim t = Await DropboxOAuth2Helper.ProcessCodeFlowAsync(UserToken, "app_id", "app_secret")&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;And I got the &lt;EM&gt;"AccessToken"&amp;nbsp;&lt;/EM&gt;from the &lt;EM&gt;"t"&amp;nbsp;&lt;/EM&gt;variable.&lt;/P&gt;
&lt;P&gt;Thanks for the help.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 06:53:11 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Getting-quot-invalid-token-quot-after-copying-User-Token/m-p/172094#M6541</guid>
      <dc:creator>Victor C.17</dc:creator>
      <dc:date>2016-06-23T06:53:11Z</dc:date>
    </item>
  </channel>
</rss>

