<?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: Access Token is invalid in android in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-Token-is-invalid-in-android/m-p/212003#M10711</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The &lt;A href="https://www.dropboxstatic.com/static/developers/dropbox-android-sdk-1.6.3-docs/com/dropbox/client2/android/AndroidAuthSession.html#authenticationSuccessful()" target="_self"&gt;authenticationSuccessful&lt;/A&gt;&amp;nbsp;is only meant for use during the actual app authorization flow, when the user chooses whether or not to authorize the app. That being the case, it will only return true during that first session.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you just want to know if you have an access token, you should use &lt;A href="https://www.dropboxstatic.com/static/developers/dropbox-android-sdk-1.6.3-docs/com/dropbox/client2/session/AbstractSession.html#isLinked()" target="_self"&gt;isLinked&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, I redacted it, but you publicly posted a valid access token, so for the sake of security, you should disable it. You can do so by revoking access to the app entirely, if the access token is for your account, on&amp;nbsp;your &lt;A href="https://www.dropbox.com/account/security" target="_self"&gt;account security page&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or, you can disable just this access token using the API:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;v1: &lt;A href="https://www.dropbox.com/developers/core/docs#disable-token" target="_blank"&gt;https://www.dropbox.com/developers/core/docs#disable-token&lt;/A&gt;&lt;BR /&gt;v2: &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#auth-token-revoke" target="_blank"&gt;https://www.dropbox.com/developers/documentation/http/documentation#auth-token-revoke&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finally, I should note that the Android Core SDK you're using uses API v1, which is &lt;A href="https://blogs.dropbox.com/developers/2016/06/api-v1-deprecated/" target="_self"&gt;deprecated&lt;/A&gt;. You should migrate to API v2. You can use the &lt;A href="https://www.dropbox.com/developers/documentation/java" target="_self"&gt;API v2 Java SDK&lt;/A&gt; for that.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Mar 2017 22:05:03 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2017-03-16T22:05:03Z</dc:date>
    <item>
      <title>Access Token is invalid in android</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-Token-is-invalid-in-android/m-p/212001#M10710</link>
      <description>&lt;P&gt;I am creating a&amp;nbsp;OAuth2AccessToken and storing it in shared preferences. The session is successful till the app is closed. It is invalid after I open the app again. This is the code I am using to create a new session using the stored access token.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;String dropboxaccesstoken = &lt;SPAN&gt;sharedpreferencessam&lt;/SPAN&gt;.getString(&lt;SPAN&gt;"dropboxaccesstoken"&lt;/SPAN&gt;, &lt;SPAN&gt;""&lt;/SPAN&gt;); &lt;SPAN&gt;// getting Boolean&lt;BR /&gt;&lt;/SPAN&gt;Log.&lt;SPAN&gt;d&lt;/SPAN&gt;(&lt;SPAN&gt;"dropboxaccesstoken"&lt;/SPAN&gt;,&lt;SPAN&gt;"token is: " &lt;/SPAN&gt;+ dropboxaccesstoken);&lt;BR /&gt;AppKeyPair appKeys = &lt;SPAN&gt;new &lt;/SPAN&gt;AppKeyPair(&lt;SPAN&gt;APP_KEY&lt;/SPAN&gt;, &lt;SPAN&gt;APP_SECRET&lt;/SPAN&gt;);&lt;BR /&gt;AndroidAuthSession session = &lt;SPAN&gt;new &lt;/SPAN&gt;AndroidAuthSession(appKeys,dropboxaccesstoken);&lt;BR /&gt;&lt;SPAN&gt;//session.setOAuth2AccessToken(dropboxaccesstoken);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;mDBApi &lt;/SPAN&gt;= &lt;SPAN&gt;new &lt;/SPAN&gt;DropboxAPI&amp;lt;AndroidAuthSession&amp;gt;(session);&lt;BR /&gt;Log.&lt;SPAN&gt;d&lt;/SPAN&gt;(&lt;SPAN&gt;"(at successful or not"&lt;/SPAN&gt;, Boolean.&lt;SPAN&gt;toString&lt;/SPAN&gt;((&lt;SPAN&gt;mDBApi&lt;/SPAN&gt;.getSession().authenticationSuccessful())));&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Logcat:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;03-17 02:47:27.119 22706-23044/com.audiorecorder.wel.voicerecorder D/dropboxaccesstoken: token is: &amp;lt;ACCESS_TOKEN_REDACTED&amp;gt;
03-17 02:47:27.145 22706-23044/com.audiorecorder.wel.voicerecorder D/(at&amp;nbsp;successful&amp;nbsp;or&amp;nbsp;not: false&lt;/PRE&gt;
&lt;P&gt;Can someone help me on this please.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:24:39 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-Token-is-invalid-in-android/m-p/212001#M10710</guid>
      <dc:creator>silent10</dc:creator>
      <dc:date>2019-05-29T09:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: Access Token is invalid in android</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-Token-is-invalid-in-android/m-p/212003#M10711</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The &lt;A href="https://www.dropboxstatic.com/static/developers/dropbox-android-sdk-1.6.3-docs/com/dropbox/client2/android/AndroidAuthSession.html#authenticationSuccessful()" target="_self"&gt;authenticationSuccessful&lt;/A&gt;&amp;nbsp;is only meant for use during the actual app authorization flow, when the user chooses whether or not to authorize the app. That being the case, it will only return true during that first session.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you just want to know if you have an access token, you should use &lt;A href="https://www.dropboxstatic.com/static/developers/dropbox-android-sdk-1.6.3-docs/com/dropbox/client2/session/AbstractSession.html#isLinked()" target="_self"&gt;isLinked&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, I redacted it, but you publicly posted a valid access token, so for the sake of security, you should disable it. You can do so by revoking access to the app entirely, if the access token is for your account, on&amp;nbsp;your &lt;A href="https://www.dropbox.com/account/security" target="_self"&gt;account security page&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or, you can disable just this access token using the API:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;v1: &lt;A href="https://www.dropbox.com/developers/core/docs#disable-token" target="_blank"&gt;https://www.dropbox.com/developers/core/docs#disable-token&lt;/A&gt;&lt;BR /&gt;v2: &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#auth-token-revoke" target="_blank"&gt;https://www.dropbox.com/developers/documentation/http/documentation#auth-token-revoke&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finally, I should note that the Android Core SDK you're using uses API v1, which is &lt;A href="https://blogs.dropbox.com/developers/2016/06/api-v1-deprecated/" target="_self"&gt;deprecated&lt;/A&gt;. You should migrate to API v2. You can use the &lt;A href="https://www.dropbox.com/developers/documentation/java" target="_self"&gt;API v2 Java SDK&lt;/A&gt; for that.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2017 22:05:03 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-Token-is-invalid-in-android/m-p/212003#M10711</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-03-16T22:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Access Token is invalid in android</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-Token-is-invalid-in-android/m-p/212011#M10712</link>
      <description>&lt;P&gt;Thanks, it solved my problem. There is no Android SDK for API v2?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2017 22:31:51 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-Token-is-invalid-in-android/m-p/212011#M10712</guid>
      <dc:creator>silent10</dc:creator>
      <dc:date>2017-03-16T22:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: Access Token is invalid in android</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-Token-is-invalid-in-android/m-p/212013#M10713</link>
      <description>&lt;P&gt;You should use the &lt;A href="https://www.dropbox.com/developers/documentation/java" target="_self"&gt;API v2 Java SDK&lt;/A&gt; for Android. There's an &lt;A href="https://github.com/dropbox/dropbox-sdk-java/tree/master/examples/android" target="_self"&gt;Android example app&lt;/A&gt;&amp;nbsp;that uses that for reference.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2017 22:33:36 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Access-Token-is-invalid-in-android/m-p/212013#M10713</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-03-16T22:33:36Z</dc:date>
    </item>
  </channel>
</rss>

