# How to use node-red-node-dropbox without a browser?

**URL:** <https://discourse.nodered.org/t/how-to-use-node-red-node-dropbox-without-a-browser/83435>\
**Category:** General\
**Created:** [5 December 2023 13:10 UTC](https://discourse.nodered.org/t/how-to-use-node-red-node-dropbox-without-a-browser/83435 "2023-12-05T13:10:41Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![georgevbsantiago](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/georgevbsantiago/32/69358_2.png) [@georgevbsantiago](https://discourse.nodered.org/u/georgevbsantiago)\
**Post date:** [5 December 2023 23:25 UTC](https://discourse.nodered.org/t/how-to-use-node-red-node-dropbox-without-a-browser/83435/3 "2023-12-05T23:25:57Z")

</div>

Hello, Thanks for the posts

I read some posts about node-red-node-dropbox (mentioned below) and understood that access via oauth2 token would have to be done on the same machine that generates it.  
Ex: If NodeRed (node-red-node-dropbox) is on VPS 'A', the oauth2 token would have to be generated in the browser of VPS 'A' instance to work.

> [@tada Refresh tokens in node-red-node-dropbox (Now published as v2.0.0)](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/10):
>
> To get it working on my raspi, I had to open the browser in the raspi because only local is allowed to get my Refresh Token. Since everything was set up locally, I was able to back up again from mac safari.

> [@tada Refresh tokens in node-red-node-dropbox (Now published as v2.0.0)](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/11):
>
> I wasn't aware that only local was allowed. Will need to to find some time in the weekend to try this myself. Thanks for testing this!!!!

> [@tada Refresh tokens in node-red-node-dropbox (Now published as v2.0.0)](https://discourse.nodered.org/t/refresh-tokens-in-node-red-node-dropbox-now-published-as-v2-0-0/65610/15):
>
> As @Frida already experienced, the hostname in the dropbox redirect\_uri must match the hostname used to access the flow editor.
> 
> 1. If you want to use _ **localhost** _ in your redirect\_uri, then you need to use the browser that is installed on that host. Because the browser installed e.g. on a raspberry, can access local resources on that same raspberry via localhost.
> 2. But normally if you access your flow editor via `https://my_rpi_name:1880/some_path`, then the redirect uri should be `https://my_rpi_name:1880/dropbox /authenticate`
> 
> Am I correct that there is only a problem for Node-RED systems that fulfill the following 2 conditions:
> 
> 1. The system is **not** accessible via localhost, because there is no browser installed on that host.
> 2. And SSL is _ **not** _ enabled (via the Node-RED settings.js file.
> 
> Because dropbox requires https, unless you use localhost.
> 
> Not sure if there is anything I could do about that, to be honest...

I understood that if the user manipulated NodeRed (node-red-node-dropbox) on VPS 'A', but tried to create the token on their personal computer (notebook, PC...), it would not work.

If it is possible to manipulate NodeRed (node-red-node-dropbox) on VPS 'A', and create the token on my notebook to later insert it into node-red-node-dropbox) on VPS 'A', then that's great!

Question: Is there no way to avoid manually creating the oauth2 token by opening Dropbox through the browser?  
I upload it to Dropbox via script, using the access token (old way), using the SDK-Dropbox JavaScript and just providing 'token' and 'account\_id', without prior access via the browser.

Thank you for your attention

---

_[View the full topic](https://discourse.nodered.org/t/how-to-use-node-red-node-dropbox-without-a-browser/83435)._
