You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

ari10's avatar
ari10
Helpful | Level 5
6 years ago

Dropbox JavaScript SDK access

In the head section of a web page I download the Dropbox Javascript with:

<script src="https://unpkg.com/dropbox/dist/Dropbox-sdk.min.js"></script>

then, a javascript function which invokes the following instruction does not return:

var dbx = new Dropbox({ accessToken: thisAccessToken });

where 'thisAccessToken' is the user's Dropbox access token.

Any suggestions on why the instruction does not complete?

Thanks!

  • ari10's avatar
    ari10
    6 years ago

    Great, thanks, this solved the problem!

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    Please check the JavaScript console for any errors.

    For instance, the constructor under the 'Dropbox' class is also named 'Dropbox', so you should use `new Dropbox.Dropbox(...)' instead of `new Dropbox(...)'.

    • ari10's avatar
      ari10
      Helpful | Level 5

      Great, thanks, this solved the problem!