# ➡ Need volunteer to help fix node-red-node-dropbox

**URL:** https://discourse.nodered.org/t/need-volunteer-to-help-fix-node-red-node-dropbox/65161
**Category:** General
**Created:** [15 July 2022 18:39 UTC](https://discourse.nodered.org/t/need-volunteer-to-help-fix-node-red-node-dropbox/65161 "2022-07-15T18:39:56Z")
**Posts on this page:** 5
**Page:** 1

<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: [15 July 2022 18:39 UTC](https://discourse.nodered.org/t/need-volunteer-to-help-fix-node-red-node-dropbox/65161/1 "2022-07-15T18:39:56Z")

</div>

The popular [node-red-node-dropbox](https://github.com/node-red/node-red-web-nodes/tree/master/dropbox) has been around since 2015, and is still popular today.  
However some months ago, Dropbox stopped issuing **long lived tokens** , and moved to an api using **short lived tokens** instead, which because the node has not been updated resulted in the tokens expiring after about 3hrs, rendering the node, and their flow inoperative. Also, if existing Dropbox users lose their current token, they will face the same problem.

The original author of the node no longer supports it, and it is currently hosted in the node-RED repo, so I am asking if anyone would be willing to take a look, and hopefully update the node to reflect the api change.  
I have tried, but TBH, I don't possess the necessary skills, but I have been in contact with a very helpful dropbox techie, who has said;

> There isn't some only correct answer to your question. It's matter either of every library' and/or application' design. The correct way depends primarily on how you prefer private info to be handled (any authentication info is a private info).  
> [In your code](https://github.com/node-red/node-red-web-nodes/blob/master/dropbox/dropbox.js#L27) you are instantiating the client object using access token only. As I mentioned before that's where your issue is coming from.  
> Take a look [here](https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Issue-in-generating-access-token/m-p/592921/highlight/true#M27586) on how actual refresh process appears (from initial authentication to refreshing steps at the end - internally as HTTPS transactions).  
> As you are using pre-generated credentials (as far as I can see), ordered HTTP calls can be used to get to all needed credential information, not just only access token.  
> Such information is not accessible through application console as was for long lived access token (not yet, at least). Once you get to all needed credentials, correct client object can be instantiated using correct Dropbox constructor's [options](https://github.com/dropbox/dropbox-sdk-js/blob/dcc134dda8d39329c518ba66c2ac1ff187e43bde/src/auth.js#L69) (accessTokenExpiresAt, refreshToken, clientId, and clientSecret all in addition to accessToken). That's it.  
> Hope this casts some extra light.  
> _Add_: The only mandatory options to getting refresh process on are refreshToken and clientId, but depending on selected authentication clientSecret may be required too. Others can be useful to optimize the refreshing in some cases (save and reuse).

I have also had an offer of help;

> Hi Paul  
> Thanks for bearing with us as we've been migrating to short-lived tokens!  
> One thing that might help, you mentioned you've made some attempts at updating your code to use short-lived tokens.  
> If you have a pull-request or some work done you can post here, we can take a look and might be able to provide more specific guidance.

Despite that kind offer (which is still very much open), again my skills would not present a serious submission, but I have no doubt that any node-RED contributor could accept this offer (I can provide contact details).

If nobody rises to the challenge, the node will probably be deprecated, which will be a loss to node-RED users, also there is no other contrib node that interacts with Dropbox.

Any volunteer?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [15 July 2022 19:29 UTC](https://discourse.nodered.org/t/need-volunteer-to-help-fix-node-red-node-dropbox/65161/2 "2022-07-15T19:29:09Z")

</div>

> [@Paul-Reed](#):
>
> had an offer of help;
> 
> > Hi Paul  
> > Thanks for bearing with us as we've been migrating to short-lived tokens!  
> > One thing that might help, you mentioned you've made some attempts at updating your code to use short-lived tokens.  
> > If you have a pull-request or some work done you can post here, we can take a look and might be able to provide more specific guidance.

Why not clone/fork the repo to your GitHub and ask the kind person to take a look. They may well PR against your repo?

---

<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: [15 July 2022 19:47 UTC](https://discourse.nodered.org/t/need-volunteer-to-help-fix-node-red-node-dropbox/65161/3 "2022-07-15T19:47:52Z")

</div>

> [@Steve-Mcl](#):
>
> Why not clone/fork the repo to your GitHub and ask the kind person to take a look

They have already seen the repo, and the offer made is to look over the progress, and give us specific guidance.  
_Not to do the work for us!_

I think that we need someone with Oath 2 knowledge to at least make a start, and then let the Dropbox techies advise us what we've got right/wrong.

---

<div class="post-metadata">

### Author: ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)
#### Post date: [15 July 2022 23:08 UTC](https://discourse.nodered.org/t/need-volunteer-to-help-fix-node-red-node-dropbox/65161/4 "2022-07-15T23:08:00Z")

</div>

Hey Paul,

This is out of my capability range also i believe - but i did some digging and found this

> **[dropbox-v2-api](https://www.npmjs.com/package/dropbox-v2-api)**
>
> NodeJS Dropbox v2 API wrapper. Latest version: 2.5.3, last published: 3 months ago. Start using dropbox-v2-api in your project by running \`npm i dropbox-v2-api\`. There are 14 other projects in the npm registry using dropbox-v2-api.

which then leads onto this

> <https://github.com/adasq/dropbox-v2-api/blob/master/example/oauth2-flow.js>

Which appears to be a hint about the way to approach it in JS - but i have no idea how to take that and turn it in to a Node - i am also looking at n8n as they have a dropbox node and trying to work out if/how to get access to their code

Craig

---

<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: [13 September 2022 23:08 UTC](https://discourse.nodered.org/t/need-volunteer-to-help-fix-node-red-node-dropbox/65161/5 "2022-09-13T23:08:17Z")

</div>

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