cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Trying to use Dropbox Chooser with Google Apps Script Web App

Trying to use Dropbox Chooser with Google Apps Script Web App

C00per
Explorer | Level 3
Go to solution

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.

 

 

 

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

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.

View solution in original post

1 Reply 1

Greg-DB
Dropbox Staff
Go to solution

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.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?