# 🎉 Refresh tokens in node-red-node-dropbox (Now published as v2.0.0)

**URL:** <https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610>\
**Category:** Feature Requests\
**Created:** [25 July 2022 21:05 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610 "2022-07-25T21:05:11Z")\
**Posts on this page:** 8\
**Page:** 3

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [2 October 2022 13:15 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/42 "2022-10-02T13:15:09Z")

</div>

Hi @Colin could you confirm if you tried Bart's fork? if so, any feedback pls?  
Before submitting the PR to update Dropbox, it would be good to know if it's working for those who have tried it, and any glitches that need fixing first.

Thanks

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [2 October 2022 13:33 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/43 "2022-10-02T13:33:46Z")

</div>

No, I haven't tried it, just confirmed how to install it.

---

<div class="post-metadata">

**Author:** ![Frida](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/frida/32/68250_2.png) [@Frida](https://discourse.nodered.org/u/Frida)\
**Post date:** [2 October 2022 14:56 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/44 "2022-10-02T14:56:09Z")

</div>

I only update manually when I have made changes. And that's only on a hobby basis.  
It runs on 3 different RPI's without any problems-

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [2 October 2022 16:56 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/45 "2022-10-02T16:56:34Z")

</div>

> [@Frida](#):
>
> I only update manually when I have made changes

Ah, you are talking about running the backup routine [that's shown above](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-pr-proposal/65610/8), and using the updated dropbox node.

> [@Frida](#):
>
> It runs on 3 different RPI's without any problems

That's good to hear, thanks for the feedback.

---

<div class="post-metadata">

**Author:** ![DiverRich](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/diverrich/32/64523_2.png) [@DiverRich](https://discourse.nodered.org/u/DiverRich)\
**Post date:** [3 October 2022 04:43 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/46 "2022-10-03T04:43:58Z")

</div>

I’ve been using it for quite some time and it works perfectly. The only hiccup I had was with it downgrading when I did an update to my Rpi but once that was sorted it’s been churning out backups on the daily for weeks now. I even had to use one a few weeks ago to fix something I broke.

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [3 November 2022 18:19 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/47 "2022-11-03T18:19:38Z")

</div>

For those following this topic, I have created the pull request yesterday:

> <https://github.com/node-red/node-red-web-nodes/pull/301>
>
> \## Types of changes
> Starting from September 30th 2021, all the new Dropbox acce…ss tokens are only 4 hours valid and then they expire. Instead of entering once the access token in the node's config screen, we should generate a refresh token. That can be done by having the user to allow (in a popup window) the node to access the API of the Dropbox app (via an oauth2 authorisation flow). That refresh token will be infinite usable, i.e. it will never expire. As soon as a short-life access token expires, the long-life refresh token will be used to generate automatically a new access token. Then that new access token can be used to access the API of the Dropbox app.
> 
> This pull request has been discussed on Discourse (see \[here\](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-pr-proposal/65610)).
> 
> \- \[X\] Bugfix (breaking change which fixes an issue)
> \- \[\] New feature (non-breaking change which adds functionality)
> 
> \## Proposed changes
> As discussed, the "Access token" field has been replaced by a "Refresh token" field. Which means that users that own an old access token (which is currently still infinite valid), won't be able to use that token anymore. Because if we would keep the "Access token" field, this would become confusing for users with refresh tokens: because the short-live access token would be renewed automatically continiously under the cover, but never be available in the "Access token" field on the screen.
> 
> As a result, this will be a breaking change. Therefore we have decided to bump the version number to 2.0.0.
> 
> Based on the feedback from the users, there are currently two (known) limitations:
> 1. The redirect url should be https, unless localhost is used.
> 2. The redirect url should have the same hostname as the one used to access the Node-RED flow editor. Which means you can only use localhost in the redirect url, if you use localhost to access the flow editor. Which is only possible if the browser is hosted on the same server where Node-RED is running.
> 
> A \[diagram\](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-pr-proposal/65610#description-of-the-implementation-3) is also available on Discourse, which visualizes the design of this pull request.
> 
> \## Checklist
> 
> 
> \- \[x\] I have read the \[contribution guidelines\](https://github.com/node-red/node-red-nodes/blob/master/CONTRIBUTING.md)
> \- \[x\] For non-bugfix PRs, I have discussed this change on the forum/slack team.
> \- \[\] I have run \`grunt\` to verify the unit tests pass
> \- \[\] I have added suitable unit tests to cover the new/changed functionality

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [24 November 2022 18:43 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/49 "2022-11-24T18:43:30Z")

</div>

For info, `node-red-node-dropbox` has now been updated to v2 🎉

The update is a breaking change, as it uses the latest dropbox api as described in the first post in this topic, and should mean that now dropbox is a viable option for node-RED users to store their data.

Many thanks to @BartButenaers for his patience and time in creating this important update.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [23 January 2023 18:43 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/50 "2023-01-23T18:43:54Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.

[Previous page](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610.md?page=2)
