<?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: After token refresh contents still need authorization to download in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/After-token-refresh-contents-still-need-authorization-to/m-p/704509#M31356</link>
    <description>&lt;P&gt;Hi again &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1732559"&gt;@lalith-mcw&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I just tried it out and it's working for me. Are you certainly passed the refresh token to and not something else? 🧐 Also to work correctly, the app key must match to the refresh token (for PKCE app secret is optional, but when given must be correct and matching too).&lt;/P&gt;&lt;P&gt;You can check if your params are correct using following command line:&lt;/P&gt;&lt;PRE&gt;curl https://api.dropbox.com/oauth2/token -d grant_type=refresh_token -d refresh_token=&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;/SPAN&gt;YOUR_REFRESH_TOKEN_HERE&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt; -d client_id=&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;/SPAN&gt;YOUR_APP_KEY_HERE&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Replace&amp;nbsp; &amp;lt;YOUR_REFRESH_TOKEN_HERE&amp;gt; to the content of refresh_token var and &amp;lt;YOUR_APP_KEY_HERE&amp;gt; to the content of key var from your code. If everything is correct you will get back something like:&lt;/P&gt;&lt;PRE&gt;{"access_token":"sl.AbX9y6...","expires_in":14400,"token_type":"bearer"}&lt;/PRE&gt;&lt;P&gt;Otherwise, you will get appropriate error message and should fix whatever needed.&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add: You can get as working example one my earlier post &lt;A title="How do I upload file using Python" href="https://www.dropboxforum.com/t5/Create-upload-and-share/How-can-a-script-or-app-get-a-shareable-Dropbox-link/m-p/680928/highlight/true#M68463" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Mon, 07 Aug 2023 13:30:27 GMT</pubDate>
    <dc:creator>Здравко</dc:creator>
    <dc:date>2023-08-07T13:30:27Z</dc:date>
    <item>
      <title>After token refresh contents still need authorization to download</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/After-token-refresh-contents-still-need-authorization-to/m-p/703622#M31340</link>
      <description>&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;import dropbox&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;box = dropbox&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Dropbox&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;oauth2_refresh_token&lt;/SPAN&gt;&lt;SPAN&gt;=&amp;lt;Refresh_Token&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;app_key&lt;/SPAN&gt;&lt;SPAN&gt;=&amp;lt;app_key&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;app_secret&lt;/SPAN&gt;&lt;SPAN&gt;=&amp;lt;app_secret&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;With logging info able to see the following message:&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;```&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;INFO : Refreshing access token.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;```&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Later while trying to fetch the metadata using the following command:&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;```box.files_get_metadata(&amp;lt;File_name&amp;gt;)```&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Error: AuthError(&amp;lt;ID&amp;gt;, AuthError('invalid_access_token', None))&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Also with new object creation tried passing the oauth2_token as well still failed fetching metadata. Read/Write permissions are enabled&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 03 Aug 2023 12:56:44 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/After-token-refresh-contents-still-need-authorization-to/m-p/703622#M31340</guid>
      <dc:creator>lalith-mcw</dc:creator>
      <dc:date>2023-08-03T12:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: After token refresh contents still need authorization to download</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/After-token-refresh-contents-still-need-authorization-to/m-p/703717#M31342</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1732559"&gt;@lalith-mcw&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Haha.. &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@488936AC5FA64023548E32631AFD9803/emoticons/1f600.png" alt=":grinning_face:" title=":grinning_face:" /&gt; You just found out a imperfection in Dropbox Python SDK. It doesn't make distinct between access token and refresh token. As seems your refresh token is invalid for some reason, but according to the message, you received, the access token became guilty (token that doesn't exist yet). &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@D88F213CAFB196B6AB70612B08AD9D31/emoticons/1f601.png" alt=":beaming_face_with_smiling_eyes:" title=":beaming_face_with_smiling_eyes:" /&gt; Just imperfection in error formatting.&lt;/P&gt;&lt;P&gt;Anyway, check your refresh token validity. &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;&lt;/P&gt;&lt;P&gt;Hope this gives direction.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2023 13:19:21 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/After-token-refresh-contents-still-need-authorization-to/m-p/703717#M31342</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-08-03T13:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: After token refresh contents still need authorization to download</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/After-token-refresh-contents-still-need-authorization-to/m-p/704134#M31346</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We'd recommend confirming the following:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Make sure the refresh token value being passed to&amp;nbsp;&lt;FONT face="andale mono,times"&gt;oauth2_refresh_token&lt;/FONT&gt; corresponds to the app key and secret being used&lt;/LI&gt;
&lt;LI&gt;Make sure that the value being passed to&amp;nbsp;&lt;FONT face="andale mono,times"&gt;oauth2_refresh_token&lt;/FONT&gt;&lt;SPAN&gt; is a &lt;FONT face="andale mono,times"&gt;refresh_token&lt;/FONT&gt; and not an&amp;nbsp;&lt;FONT face="andale mono,times"&gt;access_token&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Those are typically the reasons why &lt;FONT face="andale mono,times"&gt;invalid_access_token&lt;/FONT&gt; error would be thrown for a refresh token.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 19:07:50 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/After-token-refresh-contents-still-need-authorization-to/m-p/704134#M31346</guid>
      <dc:creator>DB-Des</dc:creator>
      <dc:date>2023-08-04T19:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: After token refresh contents still need authorization to download</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/After-token-refresh-contents-still-need-authorization-to/m-p/704145#M31347</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1517679"&gt;@DB-Des&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Those are typically the reasons why &lt;FONT face="andale mono,times"&gt;invalid_access_token&lt;/FONT&gt; error would be thrown for a refresh token.&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1517679"&gt;@DB-Des&lt;/a&gt;, Is the API that returns the 'invalid_access-token' error in such cases? 🧐 Isn't better making error text to match what actually happens? Why when error code is 400 and match to 'invalid_grant', the SDK always assumes invalid access token, while there are different cases possible?&lt;/P&gt;&lt;P&gt;I would suggest the actual error message to be passed in SDK instead of fixed text as by now done &lt;A href="https://github.com/dropbox/dropbox-sdk-python/blob/main/dropbox/dropbox_client.py#L627" target="_blank" rel="noopener"&gt;here&lt;/A&gt;. &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;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 19:26:37 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/After-token-refresh-contents-still-need-authorization-to/m-p/704145#M31347</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-08-04T19:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: After token refresh contents still need authorization to download</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/After-token-refresh-contents-still-need-authorization-to/m-p/704472#M31353</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1517679"&gt;@DB-Des&lt;/a&gt;&amp;nbsp;With the below script,&amp;nbsp;Generated the Refresh token and pasted it to update the access token. After using oauth_result.access_token only once it is able to download the contents. Rather its is like an repetitive process. Is the authorized token said to long live or with the given generated `Refresh Token` lasts until revoked (Will it generate new Access tokens everytime after token expiration using the same refresh token) ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-python/blob/main/example/oauth/commandline-oauth.py" target="_blank"&gt;https://github.com/dropbox/dropbox-sdk-python/blob/main/example/oauth/commandline-oauth.py&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 10:40:35 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/After-token-refresh-contents-still-need-authorization-to/m-p/704472#M31353</guid>
      <dc:creator>lalith-mcw</dc:creator>
      <dc:date>2023-08-07T10:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: After token refresh contents still need authorization to download</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/After-token-refresh-contents-still-need-authorization-to/m-p/704479#M31354</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1732559"&gt;@lalith-mcw&lt;/a&gt;, the script you linked to doesn't generate refresh token! Only access token comes there out. As you know, it's short lived.&lt;/P&gt;&lt;P&gt;Use any of the other 2 scripts in the same folder to get refresh token. When you have correct refresh token (not just access token passed as refresh one - so would become invalid) passing it will make your code work until revoked explicitly (i.e. it's long lived). &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;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 10:54:50 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/After-token-refresh-contents-still-need-authorization-to/m-p/704479#M31354</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-08-07T10:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: After token refresh contents still need authorization to download</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/After-token-refresh-contents-still-need-authorization-to/m-p/704488#M31355</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/422790"&gt;@Здравко&lt;/a&gt;&amp;nbsp;Tried with &lt;A href="https://github.com/dropbox/dropbox-sdk-python/blob/main/example/oauth/commandline-oauth-pkce.py" target="_blank"&gt;oauth_pkce&lt;/A&gt; script&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lalithmcw_0-1691407077422.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/39568i00FBE02B821AAB00/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lalithmcw_0-1691407077422.png" alt="lalithmcw_0-1691407077422.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now used the same refresh code with the below snippet:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;with&lt;/SPAN&gt; &lt;SPAN&gt;dropbox&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Dropbox&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;oauth2_refresh_token&lt;/SPAN&gt;&lt;SPAN&gt;=refresh_token, &lt;/SPAN&gt;&lt;SPAN&gt;app_key&lt;/SPAN&gt;&lt;SPAN&gt;=key, &lt;/SPAN&gt;&lt;SPAN&gt;app_secret&lt;/SPAN&gt;&lt;SPAN&gt;=secret) &lt;/SPAN&gt;&lt;SPAN&gt;as&lt;/SPAN&gt; &lt;SPAN&gt;dbx&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;dbx&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;users_get_current_account&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"Successfully set up client!"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Received the following error:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lalithmcw_1-1691407280551.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/39569i451455B4EE33F020/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lalithmcw_1-1691407280551.png" alt="lalithmcw_1-1691407280551.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 07 Aug 2023 11:22:18 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/After-token-refresh-contents-still-need-authorization-to/m-p/704488#M31355</guid>
      <dc:creator>lalith-mcw</dc:creator>
      <dc:date>2023-08-07T11:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: After token refresh contents still need authorization to download</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/After-token-refresh-contents-still-need-authorization-to/m-p/704509#M31356</link>
      <description>&lt;P&gt;Hi again &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1732559"&gt;@lalith-mcw&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I just tried it out and it's working for me. Are you certainly passed the refresh token to and not something else? 🧐 Also to work correctly, the app key must match to the refresh token (for PKCE app secret is optional, but when given must be correct and matching too).&lt;/P&gt;&lt;P&gt;You can check if your params are correct using following command line:&lt;/P&gt;&lt;PRE&gt;curl https://api.dropbox.com/oauth2/token -d grant_type=refresh_token -d refresh_token=&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;/SPAN&gt;YOUR_REFRESH_TOKEN_HERE&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt; -d client_id=&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;/SPAN&gt;YOUR_APP_KEY_HERE&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Replace&amp;nbsp; &amp;lt;YOUR_REFRESH_TOKEN_HERE&amp;gt; to the content of refresh_token var and &amp;lt;YOUR_APP_KEY_HERE&amp;gt; to the content of key var from your code. If everything is correct you will get back something like:&lt;/P&gt;&lt;PRE&gt;{"access_token":"sl.AbX9y6...","expires_in":14400,"token_type":"bearer"}&lt;/PRE&gt;&lt;P&gt;Otherwise, you will get appropriate error message and should fix whatever needed.&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add: You can get as working example one my earlier post &lt;A title="How do I upload file using Python" href="https://www.dropboxforum.com/t5/Create-upload-and-share/How-can-a-script-or-app-get-a-shareable-Dropbox-link/m-p/680928/highlight/true#M68463" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 13:30:27 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/After-token-refresh-contents-still-need-authorization-to/m-p/704509#M31356</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-08-07T13:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: After token refresh contents still need authorization to download</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/After-token-refresh-contents-still-need-authorization-to/m-p/704604#M31362</link>
      <description>&lt;P&gt;Thanks that did worked, this is where the whole confusion was. I was thinking the code generated here is `Refresh Token`. But realized this is just `Authorization Code` and checkouted out the &lt;A href="https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Get-refresh-token-from-access-token/td-p/596739" target="_blank" rel="noopener"&gt;solution here&lt;/A&gt; as well. Which had clear steps which mentions there are 3 types of tokens `Authorization Code`, `Refresh Token` &amp;amp; `Access Token` (Oauth Token)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lalithmcw_0-1691428286613.png" style="width: 400px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/39585i80DB6D223C40DC94/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lalithmcw_0-1691428286613.png" alt="lalithmcw_0-1691428286613.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Its better the body here is modified to `Authorization Code Generated` instead `Access Code Generated` just confused here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Used the command here&lt;/P&gt;&lt;PRE&gt;curl https://api.dropbox.com/oauth2/token \
    -d code=AUTHORIZATIONCODEHERE \
    -d grant_type=authorization_code \
    -u APPKEYHERE:APPSECRETHERE​&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;And from the JSON generated above copied the `Refresh Token` and used it as a python request post() method to fetch the `json().access_token`&lt;/P&gt;&lt;PRE&gt;curl https://api.dropbox.com/oauth2/token \
   -d refresh_token=REFRESHTOKENHERE \
   -d grant_type=refresh_token \
   -d client_id=APPKEYHERE \
   -d client_secret=APPSECRETHERE&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And finally it works with dropbox.Dropbox(&amp;lt;access_token&amp;gt;) thanks&amp;nbsp;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/422790"&gt;@Здравко&lt;/a&gt;&amp;nbsp;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1517679"&gt;@DB-Des&lt;/a&gt;&amp;nbsp;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/10"&gt;@Greg-DB&lt;/a&gt;&amp;nbsp;for the help&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 17:18:17 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/After-token-refresh-contents-still-need-authorization-to/m-p/704604#M31362</guid>
      <dc:creator>lalith-mcw</dc:creator>
      <dc:date>2023-08-07T17:18:17Z</dc:date>
    </item>
  </channel>
</rss>

