Testing the installation of an unpublished Apps Script add-on

Viewed 360

I'm developing a container-bound Apps Script add-on. I need to demonstrate the installation process as part of the OAuth verification process. I can't publish my add-on without OAuth verification, and there doesn't seem to be any other way to demonstrate the installation.

Some options I've considered are:

  • Publishing as a private add-on. However this isn't an available option for me. It's not visible in my console, possibly because I've already set it as a public add-on and the link above indicates it's not possible to change visibility
  • Installing an unpublished addon-on. This also doesn't seem to work, possibly because my script is container-bound, or for some other reason. I can share the script with other accounts, but they're unable to install it; they have no visible installation button.

So I feel like I'm caught in an unfortunate loop whereby I can never get my app verified without it already being verified.

2 Answers

Actually it turns out I was able to do this without publishing it at all. Following @TheMaster's advice, I created a new standalone Apps Script project, and then copied all the code from my previous add-on.

Then, I ran Run → Test as Add-on in the Apps Script IDE, chose a spreadsheet to test it in, and clicked on the add-on menu. Note: you have to actually click an add-on menu item, the authorization screen won't appear before then.

This time, because the add-on is now standalone, this prompted me to authorize, which looked like this: enter image description here

At this point if you start recording, it shows the required authorization prompts, including the client ID in the window URL bar. I submitted this video for Google's OAuth verification and they accepted it, so it looks like this is the easiest way.

There is no documentation explaining how to show the installation process of an add-on that has not been accepted. If you want to eventually publish the add-on publicly, then the only solution is to first publish the add-on publicly as "unlisted." Then you can remove the "unlisted" status later.

Getting one add-on approved as private, and then trying to publish it again as public won't work. You can't change a GCP project from a private to a public listing, and the GCP project has it's own ID. The approval is directly linked to the GCP project. You'd need a totally different GCP project for the public listing, and need to go through the approval process all over again. So, that doesn't make any sense to try.

The OAuth client ID must be shown in the installation video. That ID is shown in the address bar of the authorization dialog box. You need to widen out the dialog box so that the entire ID can be shown in the address bar. That way the people who are reviewing your add-on installation video can see that the OAuth ID is related. Otherwise, you could just create any video for any project, and submit it for review. They need to see the OAuth Client ID.

You can publish and add-on as unlisted, and it will appear in the GSuite Marketplace even though it's unapproved. An unapproved add-on will stop allowing installations at 100 installations. But, no one will see your unlisted add-on, and you aren't going to get a 100 installations before you get your installation video done. (As long as you don't share the unlisted link with anyone)

The other problem, is that the unapproved add-on will show a warning message and make you click the "advanced" link to get the approval dialog. You don't need to show that in your video. If the screen recording app that you're using can edit the video, then you can edit that out. Or you could edit it out later after the add-on is approved. Google probably saves your video as proof that a certain GCP project asks for certain permissions. The video that you post publicly could probably be edited. They aren't going to require another approval unless you change a scope.

Related