Associate Your Dropbox Account with a VTS Site

This quick tutorial will show you how to associate a Dropbox account with a VTS site, which will enable you to upload data to your Dropbox from within your isolated slivers.

You must associate your account with each site you want to upload to Dropbox from, but you do not need to subsequently associate slivers created at those sites. The Dropbox account is bound to your GENI user credential, and other users using your slices cannot upload to your account (although they can upload data to their own accounts).

This association process requires the use of geni-lib, as no other tools have support for the non-standard API that VTS uses for this process.

OAuth2 Dropbox Authorization

This is a two-stage process, where you will get a Dropbox authorization URL from a given VTS site, and then after visiting that web page in your browser (and logging into Dropbox as necessary), you will be given a code from Dropbox that you will send back to the VTS site:

>> SITE = VTSAM.Illinois

>> SITE.dropboxLink(context)
{'authorize_url': 'https://www.dropbox.com/oauth2/authorize?response_type=code&client_id=poczslfi15gp4l9'}

Take the URL value from authorize_url and paste it into your web browser, where you should get a page that is similar to the image below (the names will differ based on the VTS site you have chosen):

../_images/dropbox_auth.png

After you click the Allow button, you will be presented with a code to send back to VTS to finalize the authorization process:

../_images/dropbox_code.png

Now, copy that code back to geni-lib and finalize your Dropbox authorization for the site you have chosen:

>> SITE.dropboxFinalize(context, "xfcPtSUkJo0AAAAAAAAACka-IarRJxO-w5y_0_ZGMwg")
{}

Note

A successful response is an empty {} - any failure should result in an exception.

This concludes the association and now any resource reservations you make that include Dropbox mounts can send the contents of those directories to your Dropbox account. You can also upload from any existing slivers you have access to that have already reserved Dropbox mounts at this site.

Uploaded files will appear in your Dropbox account under the “Apps” directory, indexed by the site, sliver URN, host client_id, and host mount path. VTS cannot write to other locations in your Dropbox, and you cannot send files to your slivers from these directories (the functionality is upload-only from VTS).