<?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 Unable to acquire refresh token in Discuss Dropbox Developer &amp; API</title>
    <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Unable-to-acquire-refresh-token/m-p/588989#M2501</link>
    <description>&lt;P&gt;Our system already successfully acquires a short lived token, but I want to get a refresh token for Dropbox. We successfully use refresh tokens with systems like SharePoint so are familiar with the flow.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Our app has full access to Dropbox (not just the App Folder) so I am not sure if that is the problem, but we get this error from dropbox when we attempt to get the token:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;invalid_request : unknown field "token_access_type"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the request that is made&lt;/P&gt;
&lt;P&gt;&lt;A href="https://api.dropboxapi.com/oauth2/token?client_id=" target="_blank" rel="noopener"&gt;https://api.dropboxapi.com/oauth2/token?client_id=&lt;/A&gt;&amp;lt;DropBoxClientId&amp;gt;&amp;amp;client_secret=&amp;lt;DropBoxClientSecret&amp;gt;&amp;amp;redirect_uri=&amp;lt;RedirectURL&amp;gt;&amp;amp;code=&amp;lt;AccessCode&amp;gt;&amp;amp;token_access_type=offline&amp;amp;grant_type=authorization_code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If we call it without&amp;nbsp;token_access_type=offline then it works fine, but we only get a short lived token and no refresh token.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are refresh tokens only available if you are accessing the App Folder only? Am I not calling it correctly?&lt;/P&gt;</description>
    <pubDate>Thu, 07 Apr 2022 20:57:25 GMT</pubDate>
    <dc:creator>Steven_R</dc:creator>
    <dc:date>2022-04-07T20:57:25Z</dc:date>
    <item>
      <title>Unable to acquire refresh token</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Unable-to-acquire-refresh-token/m-p/588989#M2501</link>
      <description>&lt;P&gt;Our system already successfully acquires a short lived token, but I want to get a refresh token for Dropbox. We successfully use refresh tokens with systems like SharePoint so are familiar with the flow.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Our app has full access to Dropbox (not just the App Folder) so I am not sure if that is the problem, but we get this error from dropbox when we attempt to get the token:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;invalid_request : unknown field "token_access_type"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the request that is made&lt;/P&gt;
&lt;P&gt;&lt;A href="https://api.dropboxapi.com/oauth2/token?client_id=" target="_blank" rel="noopener"&gt;https://api.dropboxapi.com/oauth2/token?client_id=&lt;/A&gt;&amp;lt;DropBoxClientId&amp;gt;&amp;amp;client_secret=&amp;lt;DropBoxClientSecret&amp;gt;&amp;amp;redirect_uri=&amp;lt;RedirectURL&amp;gt;&amp;amp;code=&amp;lt;AccessCode&amp;gt;&amp;amp;token_access_type=offline&amp;amp;grant_type=authorization_code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If we call it without&amp;nbsp;token_access_type=offline then it works fine, but we only get a short lived token and no refresh token.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are refresh tokens only available if you are accessing the App Folder only? Am I not calling it correctly?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 20:57:25 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Unable-to-acquire-refresh-token/m-p/588989#M2501</guid>
      <dc:creator>Steven_R</dc:creator>
      <dc:date>2022-04-07T20:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to acquire refresh token</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Unable-to-acquire-refresh-token/m-p/589060#M2502</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1408313"&gt;@Steven_R&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;As far as I can see, you are trying authorization by code and mix two different access points calls involved in the auth flow in use - &lt;A title="Starts the OAuth 2.0 authorization flow." href="https://www.dropbox.com/developers/documentation/http/documentation#oauth2-authorize" target="_blank" rel="noopener"&gt;/oauth2/authorize&lt;/A&gt; and &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#oauth2-token" target="_blank" rel="noopener"&gt;/oauth2/token&lt;/A&gt;. "token_access_type" is valid and usable in the first call, not the second one! &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt; That's where resides your error. On possible results for the second call you can see:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;refresh_token&lt;/EM&gt; &lt;STRONG&gt;String&lt;/STRONG&gt; If the &lt;EM&gt;token_access_type&lt;/EM&gt; &lt;STRONG&gt;was&lt;/STRONG&gt; set to offline &lt;STRONG&gt;when&lt;/STRONG&gt; calling /oauth2/authorize, then response will include a refresh token. This refresh token is long-lived and won't expire automatically. It can be stored and re-used multiple times.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Make a note on meaning for "was" and "when" above. &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@FBF7D2AB59A0D6E861EBF6A36F93B7E2/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt; Read more carefully documentation.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 13:06:28 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Unable-to-acquire-refresh-token/m-p/589060#M2502</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2022-04-07T13:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to acquire refresh token</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Unable-to-acquire-refresh-token/m-p/589102#M2503</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1408313"&gt;@Steven_R&lt;/a&gt;&amp;nbsp;Здравко is correct. The 'token_access_type' parameter is only used on /oauth2/authorize, not /oauth2/token. This is unrelated to the app's access type (full Dropbox versus app folder).&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 15:33:31 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Unable-to-acquire-refresh-token/m-p/589102#M2503</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-04-07T15:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to acquire refresh token</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Unable-to-acquire-refresh-token/m-p/589263#M2504</link>
      <description>&lt;P&gt;Thanks I have included the parameter at the correct time and it now works.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 06:18:30 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Unable-to-acquire-refresh-token/m-p/589263#M2504</guid>
      <dc:creator>Steven_R</dc:creator>
      <dc:date>2022-04-08T06:18:30Z</dc:date>
    </item>
  </channel>
</rss>

