# 🎉 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:** 20\
**Page:** 2

<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:** [22 August 2022 17:05 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/22 "2022-08-22T17:05:33Z")

</div>

@dceejay: will submit the PR in a couple of weeks. Currently unfortunately I don't have time to do any oauth2 troubleshooting. My private life is quite messed up...

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [22 August 2022 18:13 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/23 "2022-08-22T18:13:36Z")

</div>

ah right - no worries - (I was on vacation and forgot where we had got to).  
Good luck with life !

---

<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:** [22 August 2022 19:41 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/24 "2022-08-22T19:41:08Z")

</div>

@Paul-Reed, I just saw this. Thanks for your continuing effort to get this working.

And, thank you @BartButenaers for what you've done. Just started playing with it, but it seems very solid.

@FSHelgeland have you seen this?

---

<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:** [22 August 2022 23:17 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/25 "2022-08-22T23:17:29Z")

</div>

No luck. This is what those 2 folders look like now. I added "OLD\_" to original version of the files so you can tell what was replaced.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/6/36d10f4c3a44c5de96f0c4e58fc09fca589870d2.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/2/127b4e7be2860a00203a173a76fc0685348d20ab.png)

This is result when I try to start Node Red:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/0/f0a68daf0e1d1b0853117f650dbf6ade3fd6011b.png)

---

<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:** [23 August 2022 08:58 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/26 "2022-08-23T08:58:53Z")

</div>

> [@stephenn](#):
>
> No luck

Stephen, Is your dropbox node up to date to start with, - v1.1.1 ?  
If so, it's most likely a copy/paste error.

The way I did it is;

1. Like you already have done, change the existing files names `mv dropbox.js OLD_dropbox.js` etc. so can always roll back.

2. Open Bart's git fork to the file that you want to copy - [dropbox.js](https://github.com/bartbutenaers/node-red-web-nodes/blob/master/dropbox/dropbox.js)  
Use the 'Copy Raw Contents' button to copy the file contents -  
 ![copy](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/2/823e83bb11eec71c1001f7982724e1817cc43f91.jpeg)

3. In your dropbox folder create the new file - `nano dropbox.js` and paste the code that you've copied. Save the file.

4. Do the same for the other ~~2~~ 3 files, and then restart node-RED

**[EDIT -]** Also update the `package.json` file as it now contains the latest 'dropbox library' and run `npm update` from within the dropbox folder to update the library.

---

<div class="post-metadata">

**Author:** ![FSHelgeland](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fshelgeland/32/64260_2.png) [@FSHelgeland](https://discourse.nodered.org/u/FSHelgeland)\
**Post date:** [28 August 2022 16:31 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/27 "2022-08-28T16:31:28Z")

</div>

Now i have, thank you 🙂

---

<div class="post-metadata">

**Author:** ![FSHelgeland](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fshelgeland/32/64260_2.png) [@FSHelgeland](https://discourse.nodered.org/u/FSHelgeland)\
**Post date:** [28 August 2022 16:52 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/28 "2022-08-28T16:52:33Z")

</div>

> [@Paul-Reed](#):
>
> nst it;
> 
> 1. Dropbox now consider the long-lived-tokens deprec

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/0/605764bc3279872aa99c88bee6f5cb6f107c843a.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/4/a4d61ec553c9b096d88657db12c918e56a8c5758.png)

Where do I go wrong?

---

<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:** [28 August 2022 17:09 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/29 "2022-08-28T17:09:48Z")

</div>

@BartButenaers hasn't published to npm yet (personal commitments).  
If you want to try it before it has been published, have a look [at my last post](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-pr-proposal/65610/26), otherwise, hopefully it will be published in the near future.

---

<div class="post-metadata">

**Author:** ![FSHelgeland](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fshelgeland/32/64260_2.png) [@FSHelgeland](https://discourse.nodered.org/u/FSHelgeland)\
**Post date:** [28 August 2022 17:12 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/30 "2022-08-28T17:12:20Z")

</div>

Aha, I have to admit I didnt reed all of it.

---

<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:** [29 August 2022 14:20 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/31 "2022-08-29T14:20:32Z")

</div>

> [@stephenn](#):
>
> No luck

@stephenn Did you try again?

---

<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:** [29 August 2022 14:38 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/32 "2022-08-29T14:38:26Z")

</div>

I tried again then started getting error messages during Node Red Start referencing my August Lock nodes that were keeping Node Red from starting. I have no idea how one would have caused the error to other. After some time of panic, I was able to get a backup copy downloaded and reloaded so I am apprehensive about trying to do another attempt at Dropbox. I will wait until there is an option to simply load thru the Pallet Manager or I find a way to do backup to another app such as Google Drive or similar. In the meantime, I will just enter a token every 3 days manually. No big deal. I have the flow set to do backup automatically so it reminds me every 3 days when it fails.

---

<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:** [2 September 2022 05:56 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/33 "2022-09-02T05:56:24Z")

</div>

This is very strange but I noticed today that I was getting a warning message about my dropbox credentials. When I checked I saw that it reverted back to 1.1.1. Anyone have any ideas why it did that?

---

<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 September 2022 09:43 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/34 "2022-09-02T09:43:44Z")

</div>

Strange, I can't imagine how node-RED could roll back to a previous app version unless you have restored a backup, or re-installed the app.  
Was your previous Dropbox at v2.0.0?

---

<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 September 2022 10:08 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/35 "2022-09-02T10:08:51Z")

</div>

> [@DiverRich](#):
>
> it reverted back to 1.1.1.

How did you upgrade?

---

<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:** [4 September 2022 08:44 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/36 "2022-09-04T08:44:13Z")

</div>

I was at 2.0.0 then I noticed it wasn't uploading any longer. When I checked it was back to 1.1.1. I haven't restored or reinstalled, so I'm not sure what caused the roll back. I redownloaded the files from GitHub and now it's back to 2.0.0. For some reason tonight I had to redo my OAuth again though. Not sure what's up with that.

---

<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:** [4 September 2022 08:46 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/37 "2022-09-04T08:46:33Z")

</div>

I just followed the procedure listed above. Went to @BartButenaers fork on GitHub at [node-red-web-nodes/dropbox at master · bartbutenaers/node-red-web-nodes · GitHub](https://github.com/bartbutenaers/node-red-web-nodes/tree/master/dropbox) and grabbed the updated files. Then followed the directions in the configuration node to set it up.

---

<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:** [4 September 2022 10:13 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/38 "2022-09-04T10:13:34Z")

</div>

> [@DiverRich](#):
>
> grabbed the updated files

Do you mean that you just replaced the files in node\_modules? If you do that without telling npm then the next time you do anything with npm it will restore whatever is defined in package.json and package-lock.json. You need to update those somehow. Normally to install a package direct from github one would do something like  
`npm install bartbutenears/node-red-node-dropbox`  
but that doesn't seem to work, I guess because that node is in a collection of nodes. Perhaps @Paul-Reed or @BartButenaers can help.

---

<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:** [4 September 2022 10:30 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/39 "2022-09-04T10:30:25Z")

</div>

> [@Colin](#):
>
> but that doesn't seem to work, I guess because that node is in a collection of nodes. Perhaps @Paul-Reed or @BartButenaers can help.

`npm install bartbutenears/node-red-node-dropbox` didn't work for me either, and I just copied/pasted the 'raw' code from Bart's repo for the 3 files ([as I described above](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-pr-proposal/65610/26)).  
It's not the easiest process, and a recipe for errors 😡

I've already asked @dceejay if there was an alternative way to install...

> [@Paul-Reed](#):
>
> It's made difficult because the dropbox folder is in a repo shared with many other nodes 😕  
> Maybe @dceejay can suggest an easier way.

---

<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:** [4 September 2022 11:13 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/40 "2022-09-04T11:13:38Z")

</div>

OK, this seemed to work for me. Go into a directory outside of .node-red (I used my home directory ~) then  
`git clone https://github.com/bartbutenaers/node-red-web-nodes`  
Which downloads those nodes to the folder node-red-web-nodes under wherever you are. Then go into node-red-web-nodes/dropbox and run  
`npm install`  
Then go back to .node-red and run  
`npm install your_folder/node-red-web-nodes/dropbox`  
Then restart node-red and refresh the browser.

So for me on linux I did

```auto
cd ~
git clone https://github.com/bartbutenaers/node-red-web-nodes
cd node-red-web-nodes/dropbox
npm install
cd ~/.node-red
npm install ~/node-red-web-nodes/dropbox
node-red-stop;node-red-start

```

and refresh the browser. Do not delete the node-red-web-nodes folder.

**[Edit]** 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:** ![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:** [6 September 2022 04:11 UTC](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/41 "2022-09-06T04:11:11Z")

</div>

That worked perfectly! Thanks!

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

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