cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Tell us what you want to see on the Community here!
Close

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

Highlighted

Trying to use Dropbox Chooser with Google Apps Script Web App

Explorer | Level 3

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
Highlighted

Re: Trying to use Dropbox Chooser with Google Apps Script Web App

Dropboxer

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
Highlighted

Re: Trying to use Dropbox Chooser with Google Apps Script Web App

Dropboxer

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

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?