title: Dropbox API on Android - Using Token to download file from Apps folder
body: <p>I generated an access token to be able to make API calls for my own account without going through the authorization flow. I found this <a href="https://www.dropbox.com/developers-v1/core/docs#files-GET" rel="nofollow noreferrer">Dropbox files Get API</a> but I don't know how to use it.</p>
  
  <p>I tried this code, but it doesn't seem to work:</p>
  
  <pre><code>    // Authentication with Token
      AppKeyPair appKeys = new AppKeyPair(APP_KEY, APP_SECRET);
      AndroidAuthSession session = new AndroidAuthSession(appKeys);
      mDBApi = new DropboxAPI&lt;AndroidAuthSession&gt;(session);
      mDBApi.getSession().setOAuth2AccessToken(ACCESS_TOKEN);
  
      // Upload a file to Apps folder
      File file = new File("working-draft.txt");
  
      FileInputStream inputStream = null;
      try {
          inputStream = new FileInputStream(file);
          DropboxAPI.Entry response = mDBApi.putFile("/magnum-opus.txt", inputStream,
                  file.length(), null, null);
          Log.i("DbExampleLog", "The uploaded file's rev is: " + response.rev);
  
      } catch (Exception e) {
          e.printStackTrace();
      }
  </code></pre>
  
  <p>How can I upload and download directly to the Apps folder using the token key?
  Also is there a way to print the list of all the files in my Apps folder?</p>