<?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: No Refresh token is returned in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/No-Refresh-token-is-returned/m-p/460802#M23653</link>
    <description>&lt;P&gt;Its a new scoped app and "Access token expiration" is set to "Short-lived".&lt;/P&gt;</description>
    <pubDate>Mon, 12 Oct 2020 19:14:35 GMT</pubDate>
    <dc:creator>Thomi</dc:creator>
    <dc:date>2020-10-12T19:14:35Z</dc:date>
    <item>
      <title>No Refresh token is returned</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/No-Refresh-token-is-returned/m-p/460602#M23651</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to figure out how the refresh token oauth2 process is working.&lt;/P&gt;&lt;P&gt;When I navigate to&lt;/P&gt;&lt;PRE&gt;https://www.dropbox.com/oauth2/authorize?client_id=&amp;lt;client_id&amp;gt;&amp;amp;token_access_type=offline&amp;amp;response_type=code&lt;/PRE&gt;&lt;P&gt;and grant premission I only get an oauth2 code but no refresh token. What am I doing wrong?&lt;/P&gt;&lt;P&gt;Do I have to enable something in the app center?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2020 09:07:35 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/No-Refresh-token-is-returned/m-p/460602#M23651</guid>
      <dc:creator>Thomi</dc:creator>
      <dc:date>2020-10-12T09:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: No Refresh token is returned</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/No-Refresh-token-is-returned/m-p/460791#M23652</link>
      <description>&lt;P&gt;Is this a newly created scoped app or an app that you're migrating? The &lt;A href="https://www.dropbox.com/lp/developers/reference/oauth-guide" target="_blank" rel="noopener"&gt;OAuth Guide&lt;/A&gt;&amp;nbsp;or blog post, &lt;A href="https://dropbox.tech/developers/migrating-app-permissions-and-access-tokens" target="_blank" rel="noopener"&gt;Migrating App Permissions and Access Tokens&lt;/A&gt;, might be useful resources here.&lt;BR /&gt;&lt;BR /&gt;In your app's settings there is an OAuth 2 section. Is the "Access token expiration" set to "Short-lived"?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2020 18:36:27 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/No-Refresh-token-is-returned/m-p/460791#M23652</guid>
      <dc:creator>TaylorKrusen</dc:creator>
      <dc:date>2020-10-12T18:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: No Refresh token is returned</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/No-Refresh-token-is-returned/m-p/460802#M23653</link>
      <description>&lt;P&gt;Its a new scoped app and "Access token expiration" is set to "Short-lived".&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2020 19:14:35 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/No-Refresh-token-is-returned/m-p/460802#M23653</guid>
      <dc:creator>Thomi</dc:creator>
      <dc:date>2020-10-12T19:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: No Refresh token is returned</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/No-Refresh-token-is-returned/m-p/460811#M23655</link>
      <description>&lt;P&gt;When you swap that code for an access token(&lt;A href="https://api.dropbox.com/oauth2/token" target="_blank"&gt;https://api.dropbox.com/oauth2/token&lt;/A&gt;), the resulting payload will contain an &lt;CODE&gt;access_token&lt;/CODE&gt; and a &lt;CODE&gt;refresh_token&lt;/CODE&gt;, which can be stored and used to issue a new access token later.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2020 19:37:27 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/No-Refresh-token-is-returned/m-p/460811#M23655</guid>
      <dc:creator>TaylorKrusen</dc:creator>
      <dc:date>2020-10-12T19:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: No Refresh token is returned</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/No-Refresh-token-is-returned/m-p/518393#M25328</link>
      <description>&lt;P&gt;Hi! I have exactly the same problem. Can you please clarify what you mean by "swap"?&lt;/P&gt;&lt;P&gt;Where should I use the code (&lt;A href="https://api.dropbox.com/oauth2/token" target="_blank" rel="noopener noreferrer"&gt;https://api.dropbox.com/oauth2/token&lt;/A&gt;)? curl? With any parameter/ID?&lt;/P&gt;&lt;P&gt;Can you please give me an easy procedure to follow, or an example? Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 17:24:39 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/No-Refresh-token-is-returned/m-p/518393#M25328</guid>
      <dc:creator>MarteIT</dc:creator>
      <dc:date>2021-05-05T17:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: No Refresh token is returned</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/No-Refresh-token-is-returned/m-p/518421#M25329</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1439287"&gt;@MarteIT&lt;/a&gt; By "swap", Taylor was referring to how the app sends the "authorization code" (which is received from the /oauth2/authorize OAuth step) in the request to the Dropbox /oauth2/token endpoint, and how the Dropbox API would send the access token and refresh token back in the response.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I recommend reading &lt;A href="https://developers.dropbox.com/oauth-guide" target="_self"&gt;the OAuth Guide&lt;/A&gt; for an overview of how this process works. Then, refer to &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#authorization" target="_self"&gt;the authorization documentation&lt;/A&gt; for information on the specific endpoints and parameters to use, including examples of calling /oauth2/token using curl.&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 19:55:38 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/No-Refresh-token-is-returned/m-p/518421#M25329</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-05-05T19:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: No Refresh token is returned</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/No-Refresh-token-is-returned/m-p/518471#M25330</link>
      <description>&lt;P&gt;Hi Greg, thank you for your reply. I thought Taylor was referring to a somehow different procedure.&lt;/P&gt;&lt;P&gt;What you wrote was already clear to me and that's what I've been trying many times. The problem is that whenever I use the "authorization code" (which is received from the /oauth2/authorize OAuth step) and use it&amp;nbsp;in the request to the Dropbox /oauth2/token endpoint, I get the following error:&lt;/P&gt;&lt;P&gt;{"error_description": "refresh token is malformed", "error": "invalid_grant"}&lt;/P&gt;&lt;P&gt;I'm just using the following command:&lt;/P&gt;&lt;P&gt;curl &lt;A href="https://api.dropbox.com/oauth2/token" target="_blank"&gt;https://api.dropbox.com/oauth2/token&lt;/A&gt; -d grant_type=refresh_token -d refresh_token=["authorization code"] -u [xxxxxx]:[yyyyyyy]&lt;/P&gt;&lt;P&gt;Where am I wrong?&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 00:36:57 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/No-Refresh-token-is-returned/m-p/518471#M25330</guid>
      <dc:creator>MarteIT</dc:creator>
      <dc:date>2021-05-06T00:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: No Refresh token is returned</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/No-Refresh-token-is-returned/m-p/518611#M25337</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1439287"&gt;@MarteIT&lt;/a&gt; To exchange or "swap" the authorization code for an access token and refresh token you should use "grant_type=authorization_code", as shown in the "access token request in code flow" example (or "PKCE code flow token request" example, if using PKCE) in &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#oauth2-token" target="_self"&gt;the /oauth2/token documentation&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using "grant_type=refresh_token" is for when you would later use a refresh token to get a new short-lived access token.&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 15:10:26 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/No-Refresh-token-is-returned/m-p/518611#M25337</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-05-06T15:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: No Refresh token is returned</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/No-Refresh-token-is-returned/m-p/518620#M25342</link>
      <description>&lt;P&gt;Oh alright! I didn't get that. Honestly I find the documentation really misleading:&lt;/P&gt;&lt;P&gt;Example: refresh token request&lt;/P&gt;&lt;PRE&gt;curl https://api.dropbox.com/oauth2/token \
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-d grant_type=refresh_token \
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-d refresh_token=&amp;lt;REFRESH_TOKEN&amp;gt; \
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-u &amp;lt;APP_KEY&amp;gt;:&amp;lt;APP_SECRET&amp;gt;&lt;/PRE&gt;&lt;P&gt;Anyway, now I used:&lt;/P&gt;&lt;P&gt;curl &lt;A href="https://api.dropbox.com/oauth2/token" target="_blank" rel="noopener"&gt;https://api.dropbox.com/oauth2/token -d code=[auth code] -d grant_type=authorization_code -d redirect_uri=&lt;/A&gt;&lt;A href="https://www.dropbox.com/1/oauth2/display_token" target="_blank" rel="noopener"&gt;https://www.dropbox.com/1/oauth2/display_token -u [xxxxxx]:[yyyyyy]&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and I got this error:&lt;/P&gt;&lt;P&gt;{"error_description": "redirect_uri mismatch", "error": "invalid_grant"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I set the Redirect URIs --&lt;A href="https://www.dropbox.com/1/oauth2/display_token--" target="_blank"&gt;https://www.dropbox.com/1/oauth2/display_token--&lt;/A&gt;&lt;/P&gt;&lt;P&gt;as indicated in some of your previous replies. Still can't get it work. Any suggestion? Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 15:41:57 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/No-Refresh-token-is-returned/m-p/518620#M25342</guid>
      <dc:creator>MarteIT</dc:creator>
      <dc:date>2021-05-06T15:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: No Refresh token is returned</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/No-Refresh-token-is-returned/m-p/518624#M25344</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1439287"&gt;@MarteIT&lt;/a&gt; The 'redirect_uri' value you supply to /oauth2/token, if any, should exactly match the 'redirect_uri' value supplied to /oauth2/authorize, if any, when that particular authorization code was retrieved. If they don't match, you'll get this error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The &lt;A href="https://www.dropbox.com/1/oauth2/display_token" target="_blank"&gt;https://www.dropbox.com/1/oauth2/display_token&amp;nbsp;&lt;/A&gt; page is a basic page provided by Dropbox for use with the "token" flow (if the app doesn't have its own redirect URI to use and so instead needs to display the access token directly to the user), not the "code" flow as you're using here, so it probably doesn't make sense for your use case.&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 15:49:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/No-Refresh-token-is-returned/m-p/518624#M25344</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-05-06T15:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: No Refresh token is returned</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/No-Refresh-token-is-returned/m-p/518632#M25345</link>
      <description>&lt;P&gt;Finally it worked!! &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;&lt;/P&gt;&lt;P&gt;Thank you for your patience.&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 16:17:59 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/No-Refresh-token-is-returned/m-p/518632#M25345</guid>
      <dc:creator>MarteIT</dc:creator>
      <dc:date>2021-05-06T16:17:59Z</dc:date>
    </item>
  </channel>
</rss>

