     expose.amplify = amplify
 
     spy.parseQueryString = parseQueryString
+    spy.ensureDropboxToken = ensureDropboxToken
 
     spy.coffeeconsole = coffeeconsole
     spy.hashKeys = hashKeys

                            log "ERROR: File #{path} not found on Dropbox."
                            history.pushState(null, null, "#BLANK")
                        else
                            if dbx.accessToken?
                                log "ERROR: #{error.error} (Status: #{error.status})"
                                history.pushState(null, null, "#BLANK")
                            else
                                slog 'Redirect:'
                                slog authenticationUrl
                                window.location = authenticationUrl




    expose.launchDropBoxChooser = () ->
        slog 'launchDropBoxChooser'
        # Get access token first so we can convert the link to a path later
        ensureDropboxToken(CHOOSE).then () ->
            Dropbox.choose options =
                extensions: ['text', '.taskpaper', '.txt', '.ft']
                success: (files) ->
