Dropbox API Chooser with JS from localhost: Origin does not match any application domain

I am trying to access my dropbox application from a local host to upload images from there. A popup window will appear for selection, but I get an error message:

Origin does not match any application domain

SCRIPT

 <div id="container"><a id="link"></a></div>


<script>
  var button = Dropbox.createChooseButton({
    success: function (files) {
      var linkTag = document.getElementById('link');
      linkTag.href = files[0].link;
      linkTag.textContent = files[0].link;
    },
    linkType: 'direct'
  });
  document.getElementById('container').appendChild(button);
</script>

I included dropins.js with the application key generated by Dropbox.

Dropbox Settings

OAUTH2 redirect URI set to

http://127.0.0.1:8020/

Any ideas? I still tried a lot:

  • URI without port
  • URI with my folder ... / balin -spice /
  • Localhost URI due to URI abbreviation
+4
source share
1 answer

(https://www.dropbox.com/developers/apps/info/...), "Drop-ins domains". , . (, , , 127.0.0.1 / localhost.)

+8

Source: https://habr.com/ru/post/1542123/


All Articles