<?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 Do not get 'oauth1AccessSecret' while using OAuth V1 in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Do-not-get-oauth1AccessSecret-while-using-OAuth-V1/m-p/192316#M8535</link>
    <description>&lt;P&gt;We are currenlty migrating&amp;nbsp;API v1 to v2. While doing so we wanted to upgrade the tokens of our existing users but one of the required parameters to do so 'access secret' is missing in the v1 response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are getting the following response for OAuth v1&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{"access_token": "3XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "token_type": "bearer", "uid": "87878789", "account_id": "dbid:AANNJDHJFHFJKGFRJKFUYGFJK"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do we upgrade our old OAuth v1 users' access tokens?&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 09:28:50 GMT</pubDate>
    <dc:creator>Jay_Nuggehalli</dc:creator>
    <dc:date>2019-05-29T09:28:50Z</dc:date>
    <item>
      <title>Do not get 'oauth1AccessSecret' while using OAuth V1</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Do-not-get-oauth1AccessSecret-while-using-OAuth-V1/m-p/192316#M8535</link>
      <description>&lt;P&gt;We are currenlty migrating&amp;nbsp;API v1 to v2. While doing so we wanted to upgrade the tokens of our existing users but one of the required parameters to do so 'access secret' is missing in the v1 response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are getting the following response for OAuth v1&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{"access_token": "3XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "token_type": "bearer", "uid": "87878789", "account_id": "dbid:AANNJDHJFHFJKGFRJKFUYGFJK"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do we upgrade our old OAuth v1 users' access tokens?&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:28:50 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Do-not-get-oauth1AccessSecret-while-using-OAuth-V1/m-p/192316#M8535</guid>
      <dc:creator>Jay_Nuggehalli</dc:creator>
      <dc:date>2019-05-29T09:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Do not get 'oauth1AccessSecret' while using OAuth V1</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Do-not-get-oauth1AccessSecret-while-using-OAuth-V1/m-p/192323#M8539</link>
      <description>&lt;P&gt;Hi Jay, it looks like you're using the &lt;A href="https://www.dropbox.com/developers-v1/core/docs#oa2-from-oa1" target="_self"&gt;/1/oauth2/token_from_oauth1&lt;/A&gt;&amp;nbsp;endpoint to get an OAuth 2 access token from an OAuth 1 access token.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on the response you shared, that's working correctly. The "access_token" value there is the OAuth 2 access token.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OAuth 2 access tokens are different from OAuth 1 access tokens in that OAuth 2 access tokens only have one part, whereas&amp;nbsp;&lt;SPAN&gt;OAuth 1 access tokens have two parts&amp;nbsp;(a key and secret).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Once you have this OAuth 2 access token, you can use it to call both API v1 and API v2 using the OAuth 2 protocol for bearer tokens. I.e., you can just add an&amp;nbsp;"Authorization" header with value "Bearer ACCESS_TOKEN_HERE".&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2016 22:03:09 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Do-not-get-oauth1AccessSecret-while-using-OAuth-V1/m-p/192323#M8539</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-10-27T22:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: Do not get 'oauth1AccessSecret' while using OAuth V1</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Do-not-get-oauth1AccessSecret-while-using-OAuth-V1/m-p/192603#M8568</link>
      <description>&lt;P&gt;We currenlty have a bunch of dropbox user tokens using the V1 API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When we used V1 API to get the access token we were not getting "access token secret" from the response.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Apparently, this "access token secret" is required by the Dropbox SDK to migrate V1 access token to V2 access token.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also as already mentioned we are trying to use the Dropbox Java SDK 2.1.2 to perform the migration of access token.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please find the code snippet below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;private String upgradeAccessTokenV1ToV2(String accessToken_V1) {
DbxOAuth1AccessToken oauth1AccessToken = new DbxOAuth1AccessToken(
accessToken_V1, "SECRET_NOT_AVAILABLE");

DbxAppInfo appInfo = new DbxAppInfo(config.getClientId(), config.getClientSecret());
// Get an OAuth 2 access token.
DbxRequestConfig requestConfig = new DbxRequestConfig(clientIdentifier);
DbxOAuth1Upgrader upgrader = new DbxOAuth1Upgrader(requestConfig,appInfo);
String oauth2AccessToken = "";
try {
oauth2AccessToken = upgrader
.createOAuth2AccessToken(oauth1AccessToken);
System.out.println("OAuth 2 access token obtained.");
} catch (DbxException ex) {
System.err.println("Error getting OAuth 2 access token: "
+ ex.getMessage());
}

return oauth2AccessToken;
}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As mentioned in the earlier post we do not get the Oauth version 1 token secret from the v1 API to plug in&amp;nbsp;&lt;SPAN&gt;"SECRET_NOT_AVAILABLE&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2016 18:05:56 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Do-not-get-oauth1AccessSecret-while-using-OAuth-V1/m-p/192603#M8568</guid>
      <dc:creator>Jay_Nuggehalli</dc:creator>
      <dc:date>2016-10-31T18:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: Do not get 'oauth1AccessSecret' while using OAuth V1</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Do-not-get-oauth1AccessSecret-while-using-OAuth-V1/m-p/192626#M8577</link>
      <description>If your access tokens don't have a separate "secret" portion, it sounds like you already have OAuth 2 access tokens.&lt;BR /&gt;&lt;BR /&gt;Note that API v1 supports both OAuth 1 and OAuth 2 (whereas API v2 only supports OAuth 2), so you may already have been using OAuth 2 access tokens with API v1.&lt;BR /&gt;&lt;BR /&gt;In that case, you don't need to migrate these tokens, and can directly use them with API v2.</description>
      <pubDate>Mon, 31 Oct 2016 18:05:34 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Do-not-get-oauth1AccessSecret-while-using-OAuth-V1/m-p/192626#M8577</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-10-31T18:05:34Z</dc:date>
    </item>
  </channel>
</rss>

