Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

Deyanj's avatar
Deyanj
Explorer | Level 3
5 years ago

Javascript sdk

Hi. I am kind of stuck. I tried following the github example for the javascript sdk dropbox api but i am not able to access files in the app folder. Can I get an overview of the process and a short sample code to get me started. What i intend to do is to create a web page using html and javascript where i can access a file in dropbox. Thank you.

3 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    5 years ago

    It sounds like you're trying to use the Dropbox API v2 JavaScript SDK. That comes with a number of examples that you can try here. There are also instructions on that page for running the examples. 

     

    Did you follow those instructions? Which example are you trying in particular? Also, can you elaborate on what you mean when you say you are "not able to access files in the app folder"? For instance, please share any unexpected error or output.

  • Deyanj's avatar
    Deyanj
    Explorer | Level 3
    5 years ago

    Thank you for the reply. I downloaded the javascript sdk files and installed on my Mac. However, I want to start the development server i.e. server.js but it throws up an error. See below. I don't think I can move forward if I do not get the node server up and running.

     

    Adeyanjus-MacBook-Pro:javascript adeyanjuteslim-balogun$ node server.js

    /Users/adeyanjuteslim-balogun/Documents/GitHub/dropbox-sdk-js/node_modules/rollup-endpoint/index.js:15

        throw Error('[rollup-endpoint] File does not exist: ' + options.entry);

        ^

     

    Error: [rollup-endpoint] File does not exist: /Users/adeyanjuteslim-balogun/Documents/GitHub/dropbox-sdk-js/dist/Dropbox-sdk.js

        at Object.exports.serve (/Users/adeyanjuteslim-balogun/Documents/GitHub/dropbox-sdk-js/node_modules/rollup-endpoint/index.js:15:11)

        at Object.<anonymous> (/Users/adeyanjuteslim-balogun/Documents/GitHub/dropbox-sdk-js/examples/javascript/server.js:12:10)

        at Module._compile (internal/modules/cjs/loader.js:1063:30)

        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)

        at Module.load (internal/modules/cjs/loader.js:928:32)

        at Function.Module._load (internal/modules/cjs/loader.js:769:14)

        at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)

        at internal/main/run_main_module.js:17:47

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    5 years ago

    To run those examples, you'll need to follow the instructions here for setting that up. Did you do so? What output did you get if so?

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!