We’re aware of an issue causing slower load times on the Dropbox Community forum. It should be resolved soon. Thanks for your patience!
Forum Discussion
C00per
7 years agoExplorer | Level 3
Trying to use Dropbox Chooser with Google Apps Script Web App
Getting the error: Origin does not match any app domain
This is my setup function:
function setupDropBox() {
var options ={success: function(files) {dbxUpload(files);}}
var button = Dropbox.createChooseButton(options);
document.getElementById("dropbox_controls").appendChild(button);
}
Inserted this into the <head>
<script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="appkey"></script>
This is what the Google Apps Script Web App Deployment Url Looks like:
https://script.google.com/a/mydomainname.com/macros/s/IdStringHere/exec
I have a G-Suite Business Account
I'm thinking it should be some substring of the Deployment Url. But this is the first time I wrote an app like this and I don't know much about it.
In order to use the Dropbox Chooser or Saver you need to pre-register the domains you'll use it on. You can do that by entering them under "Chooser/Saver domains" on your app's page on the App Console:
https://www.dropbox.com/developers/apps
If you don't do so, you'll get this error message when attempting to use the Chooser or Saver.Note however that registering a domain allows any page on that domain to use your app key for the Chooser/Saver. In this case, you're using what appears to be a shared domain of "script.google.com", so if you register that, any page on "script.google.com" would be able to use your app key for the Chooser/Saver.
1 Reply
- Greg-DB7 years ago
Dropbox Community Moderator
In order to use the Dropbox Chooser or Saver you need to pre-register the domains you'll use it on. You can do that by entering them under "Chooser/Saver domains" on your app's page on the App Console:
https://www.dropbox.com/developers/apps
If you don't do so, you'll get this error message when attempting to use the Chooser or Saver.Note however that registering a domain allows any page on that domain to use your app key for the Chooser/Saver. In this case, you're using what appears to be a shared domain of "script.google.com", so if you register that, any page on "script.google.com" would be able to use your app key for the Chooser/Saver.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!
Related Content
- 4 years agoanonymous