# \[ANNOUNCEMENT\] Dropbox node versie 2.1.0 (beta) - refresh token refactored

**URL:** <https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312>\
**Category:** Developing Nodes\
**Created:** [6 January 2023 22:05 UTC](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312 "2023-01-06T22:05:50Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [8 January 2023 00:36 UTC](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312/21 "2023-01-08T00:36:53Z")

</div>

> [@BartButenaers](#):
>
> I have no clue. I haven't used node-fetch in my code. I see [here](https://github.com/dropbox/dropbox-sdk-js/blob/main/package.json#L108) that the dropbox (sdk) library uses `@types/node-fetch` as a peer dependency. But I haven't changed anything about that: the dropbox node was already using the dropbox javascript sdk library in the past.
> 
> I assume it now occurs for you because [here](https://github.com/dropbox/dropbox-sdk-js/blob/master/src/auth.js#L323) it seems that the dropbox SDK uses node-fetch to refresh the access token (based on your refresh token).
> 
> But I don't use npm enough to troubleshoot this. Hopefully somebody else can give some tips...  
> Should I perhaps add the node-fetch library as a dependency to the dropbox node?

Tried `npm install --save @types/node-fetch` prior to `npm install` and copied `.package-lock.json` from the working version of `dropbox` I already had and all the error messages went away. (No problem with the user limit either)

Sorry forgot to mention - Thank you for all the work you put into this, my Dropbox Backup is now working again. 🥳

---

<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:** [8 January 2023 07:03 UTC](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312/22 "2023-01-08T07:03:25Z")

</div>

> [@Buckskin](#):
>
> Tried that and it worked although I may have messed up somewhere else before (now shows 1 / 500).

Ok, thanks for the confirmation! Very useful feedback.  
Think it is better if we also add this on the readme page.

> [@Buckskin](#):
>
> One suggestion `And set the required app permissions`, it would probably be worth putting in that

Yes again something for the readme page.  
I had the same problem during my developments. Could save some headaches for others...

> [@Buckskin](#):
>
> Tried `npm install --save @types/node-fetch` prior to `npm install` and copied `.package-lock.json` from the working version of `dropbox` I already had and all the error messages went away.

Again thanks again for confirming this. Although I don't understand why I didn't have that error...  
And not sure how to solve it: add `@types/node-fetch` to the package.json of the dropbox node perhaps.

---

<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:** [8 January 2023 19:45 UTC](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312/23 "2023-01-08T19:45:16Z")

</div>

9 posts were split to a new topic: [Oath - why is it so complex?](https://discourse.nodered.org/t/oath-why-is-it-so-complex/73383)

---

<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:** [8 January 2023 20:11 UTC](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312/24 "2023-01-08T20:11:20Z")

</div>

@Paul-Reed,  
Thanks for separating the discussions!

This new version has been implement to solve the Github [issue](https://github.com/node-red/node-red-web-nodes/issues/304) from @stephenn . If he can test it and confirm it works, then I consider this to be ready to be published on npm.

---

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [8 January 2023 21:13 UTC](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312/25 "2023-01-08T21:13:58Z")

</div>

I have just installed the new Dropbox node on a Pi running Buster with no problems.

This instance of Node-RED is also using @TotallyInformation s `alternate-node-red-installer`. All that was required was to cd into the `<root folder name>/data` directory instead of `~/.node-red`

I found that it is possible to use an access token generated when setting up an earlier Dropbox node.

Is it OK to delete the `node-red-web-nodes` directory once the Dropbox node has been installed?

---

<div class="post-metadata">

**Author:** ![stephenn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stephenn/32/66644_2.png) [@stephenn](https://discourse.nodered.org/u/stephenn)\
**Post date:** [8 January 2023 21:31 UTC](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312/26 "2023-01-08T21:31:00Z")

</div>

> [@BartButenaers](#):
>
> If he can test it and confirm it works, then I consider this to be ready to be published on npm.

I have only ever installed palettes from within Node Red GUI. What are the instructions to install from this different source?

---

<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:** [8 January 2023 21:38 UTC](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312/27 "2023-01-08T21:38:08Z")

</div>

> [@stephenn](#):
>
> What are the instructions to install from this different source?

I have posted the instructions above... [[ANNOUNCEMENT] Dropbox node versie 2.1.0 (beta) - refresh token refactored - #7 by Paul-Reed](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312/7)

---

<div class="post-metadata">

**Author:** ![stephenn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stephenn/32/66644_2.png) [@stephenn](https://discourse.nodered.org/u/stephenn)\
**Post date:** [8 January 2023 21:39 UTC](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312/28 "2023-01-08T21:39:00Z")

</div>

Got it! I missed that in all of the technical talk. Cross your fingers!

---

<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:** [8 January 2023 21:46 UTC](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312/29 "2023-01-08T21:46:13Z")

</div>

> [@Buckskin](#):
>
> Is it OK to delete the `node-red-web-nodes` directory once the Dropbox node has been installed?

**No!** , that comes later when the new version is published to npm.

As @Colin [has suggested](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/40);

> Once it has been released to npm then
> 
> ```auto
> npm remove node-red-node-dropbox
> npm install node-red-node-dropbox
> 
> ```
> 
> and you can delete the node-red-web-nodes folder.

---

<div class="post-metadata">

**Author:** ![stephenn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stephenn/32/66644_2.png) [@stephenn](https://discourse.nodered.org/u/stephenn)\
**Post date:** [8 January 2023 22:01 UTC](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312/30 "2023-01-08T22:01:53Z")

</div>

SUCCESS!!!!! Great work!!!!!! Thank you!!!!!

---

<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:** [8 January 2023 22:19 UTC](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312/31 "2023-01-08T22:19:24Z")

</div>

Thanks for testing @stephenn!  
I assume you have tested it without SSL, i.e. plain http? And no localhost domain?

---

<div class="post-metadata">

**Author:** ![stephenn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stephenn/32/66644_2.png) [@stephenn](https://discourse.nodered.org/u/stephenn)\
**Post date:** [8 January 2023 22:46 UTC](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312/32 "2023-01-08T22:46:26Z")

</div>

There were the 3 redirect URLs still in Dropbox.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/b/db3acd6a73e42eca9871ab3d379f6332fedebfba.png)

I don't know which one was used

---

<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:** [9 January 2023 06:05 UTC](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312/33 "2023-01-09T06:05:51Z")

</div>

Hi @stephenn,  
I don't use redirect url's anymore, because these were causing all the troubles. So if you remove them it should still work.  
I was just wondering if your url (to acces your flow editor ) was http or https, when you tested this new version?

---

<div class="post-metadata">

**Author:** ![stephenn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stephenn/32/66644_2.png) [@stephenn](https://discourse.nodered.org/u/stephenn)\
**Post date:** [9 January 2023 10:46 UTC](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312/34 "2023-01-09T10:46:08Z")

</div>

It's still just HTTP and everything worked. My flow runs automatically at 1:30am on Mondays and that flow worked without my intervention again a few hours ago. Your hard work is MUCH appreciated.

---

<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:** [9 January 2023 21:04 UTC](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312/35 "2023-01-09T21:04:23Z")

</div>

Dropbox node version _ **2.1.0** _ is now available in the palette:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/5/853d09193fcff6aa2ade891f8ef686900b139cf8.png)

Thanks to @dceejay for publishing it!

---

<div class="post-metadata">

**Author:** ![alfakenzo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/alfakenzo/32/50606_2.png) [@alfakenzo](https://discourse.nodered.org/u/alfakenzo)\
**Post date:** [14 January 2023 23:35 UTC](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312/36 "2023-01-14T23:35:01Z")

</div>

Hi,  
i cant set in firefox to prefer http so i get always arroer that client is not allowed

---

<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:** [15 January 2023 06:15 UTC](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312/37 "2023-01-15T06:15:48Z")

</div>

Hi @alfakenzo,

- What do you mean by _"cannot set in firefox to prefer http"_?
- Can you explain details about how your setup works in detail (if you connect to your flow editor with http, and so on...). Otherwise we won't be able to help you.

Bart

---

<div class="post-metadata">

**Author:** ![alfakenzo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/alfakenzo/32/50606_2.png) [@alfakenzo](https://discourse.nodered.org/u/alfakenzo)\
**Post date:** [18 January 2023 20:37 UTC](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312/38 "2023-01-18T20:37:21Z")

</div>

I try to use the function inside nodered to set the config with 2.1.1. I do every step but when i press the outh2 link i get always a error page. I got it only 1 time running with to get a refresh key. but since that no more

---

<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:** [18 January 2023 20:44 UTC](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312/39 "2023-01-18T20:44:02Z")

</div>

> [@alfakenzo](#):
>
> i get always a error page

You haven't given us much information about your issue....

What did the error page say? what sort or error? can you give us a screenprint?  
Tell us about your system, and are you using http or https for your server

---

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [19 January 2023 19:30 UTC](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312/40 "2023-01-19T19:30:13Z")

</div>

If the error is to do with This app has reached its user limit then have you tried the fix that @BartButenaers suggested. This worked for me. Check out this reply further up this topic

> [@\[ANNOUNCEMENT\] Dropbox node versie 2.1.0 (beta) - refresh token refactored](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312/18):
>
> I had a similar issue last week when I used the dropbox app from @Paul-Reed to test. But then I switched to my own app and the issue hasn't occured anymore. I am not using Dropbox myself so I am not a specialist. But read this somewhere: If you have created your own Dropbox app, you can only connect to it from one domain and for 1 Dropbox account. However you can increase the number of accounts/domains without applying for production by clicking on 'Enable additional users' in the App Conso…

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/1/419f64f27bda00c47bc23141ca5a838f88ea3096.png)

[Previous page](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312.md?page=1)

[Next page](https://discourse.nodered.org/t/announcement-dropbox-node-versie-2-1-0-beta-refresh-token-refactored/73312.md?page=3)
