18

I am trying to publish a spreadsheet web add-on but getting following error.

There is no API Console project with the id specified in the manifest's api_console_project_id field

enter image description here Can anyone tell me why I am getting this error ?

Rubén
  • 34,714
  • 9
  • 70
  • 166
Hari Das
  • 10,145
  • 7
  • 62
  • 59
  • 1
    Looks like you have not enabled proper APIs in Cloud Console. Check [this](https://developers.google.com/apps-script/add-ons/domain-wide#before_you_publish) link – Darpan Sanghavi May 08 '18 at 11:21
  • I don't want to publish to market place. Why should I enable the marketplace SDK ? – Hari Das May 08 '18 at 19:08
  • Have you tried the options specified in this [SO post](https://stackoverflow.com/questions/45888142/publish-an-add-on-privately)? As well as this [SO post](https://stackoverflow.com/questions/22664144/deploy-and-use-google-sheets-add-on-with-google-apps-script/22715940#22715940)? – MαπμQμαπkγVπ.0 May 09 '18 at 10:59
  • @MαπμQμαπkγVπ.0 I think those links are not relevant. My problem is something else. – Hari Das May 10 '18 at 09:34
  • @HariDas :Are you publishing this domain for particular domain? Or is it for everyone? – Darpan Sanghavi May 16 '18 at 11:10
  • 1
    As per Google docs "Publishing an add-on for domain-wide install requires you to enable and configure the G Suite Marketplace SDK. " so even if you do not want to publish to MarketPlace you need to Enable this API and configure it. – Darpan Sanghavi May 16 '18 at 11:12
  • @DarpanSanghavi It is for everyone. How enabling the SDK related to the error message api_console_project_id. – Hari Das May 16 '18 at 16:50
  • Is the Script Project on My Unit or on a Team Drive? Are you the owner of the project? – Rubén May 20 '18 at 18:24

3 Answers3

23

Gosh... not sure why this was so hard.

If Google are reading this: it'd be more user-friendly to run the various API checks before the user selects to publish their add-on and/or provide a link to the correct documentation! Then fix that super cryptic error message.

Anyway, if you are stuck with this error, this is what you need to do. (Thanks Tanya Gupta for putting me on the right track).

Step 1: Enable the GSuite Marketplace SDK

Follow these steps:

  1. From the Script Editor, open the Resources menu item then select Cloud Platform Project
  2. Click the button View API Console (you can also click the link with your project ID)
  3. Click the hamburger (navigation) icon on the top left and select "APIs & Services" then "Library"
  4. Search for "GSuite Marketplace SDK". It's important you install the SDK (software development kit) not the API.
  5. Click the ENABLE button
  6. You should now be able to see an option for Configuration in the menu on the left.

GSuite Marketplace SDK

Step 2: Configure the GSuite Marketplace SDK

For configuration you will need to:

  • select at least one language and enter an application description (for your add-on). The name should be pre-filled and match your script name.
  • upload some icons of various sizes
  • add a Terms of Service URL (I initially used a public Google Doc for my T&Cs but this would not pass the new OAuth client requirements which require a verified domain. If you don't have a verified domain then users will see a security warning when installing your add-on. You - apparently - can use Github pages but please don't quote me on that.)
  • enable at least one Add-on extension

When you enable the Add-on extension, you will need to provide the following information:

  • Add-on Script Project Key can be found from the Script Editor. Go to File > Project Properties and copy the value for Project key (Deprecated)
  • Add-on Script Version is the version of your script. You can find the version in the Script Editor. Go to File > Manage Versions and select the latest version of your script.

Note: your add-on script version will be updated automatically when you publish new releases of your add-on.

Google documentation:

Dagmar
  • 2,968
  • 23
  • 27
  • 1
    +1 for this, really helpful. What an absolute joke this is though. I see now reason why this has to even exist never mind being to cryptic and complicated – Dan Hastings Mar 28 '19 at 18:59
  • at step 4, what does this mean "It's important you install the SDK" – EdgeDev Apr 03 '19 at 14:01
  • @Micklo_Nerd It means that you need to be sure to enable the API called "GSuite Marketplace SDK". There is an API (Apps Marketplace API) that also comes up in the search results which is not required to publish add-ons – Dagmar Apr 04 '19 at 11:44
7

Just to build on Dagmar's Answer

Solve this issue in 8 steps with Pictures:

  1. On Apps Script Menu Bar, go to Resources > Cloud Platform project...

Resources > Cloud Platform project

  1. On Google Cloud Platform, go to the left navigation menu Select APIs & Services > Library

PIs & Services > Library

  1. In the search bar that appears, type in "GSuite Marketplace SDK" Hit Search, once it appears click it.

GSuite Marketplace SDK

  1. Click on "ENABLE"

Enable GSuite Marketplace SDK

  1. Once you click Enable in step 4. the screen below should appear. Select "CONFIGURATION"

CONFIGURATION

  1. Fill the document as you deem fit, but the most important part is shown below.

  2. Scroll Down to Editor Add-on extensions, then select the Google App you're building your add-on for. It's the same process for Docs, Forms Sheets or Slides Add-ons

enter image description here

  1. How to Get Script Project Key. Go back to your Apps Script Page.

Go to File > Project properties. Select the 'Info' tab. Then copy the value of Project key (Deprecated) and paste into the "Script Project Key" field

Script Project Key

  1. How to Get Script Version. Still on your Apps Script Page.

Go to File > Manage versions....

Then copy the value of Version and paste into the "Script Version" field

Script Version

  1. Click Save Changes and voila you're done. Do not forget to add the privacy policy URL and other required info, else the changes will not be saved
EdgeDev
  • 2,376
  • 2
  • 20
  • 37
  • 2
    Building even more on these instructions I've created these instructions: https://docs.google.com/document/d/1gG0_EClZC4ztKHDT2yn8v9NmUh_-sqYFe9vGg6Snxgg/edit?usp=sharing – Nathan May 31 '19 at 04:03
  • 1
    I've only found help for this on this page...what the hell kind of convoluted process is this without clear documentation?? – Josh Bowman Jun 09 '19 at 22:58
3

If you are publishing on Google Apps Marketplace, you need to not only enable the API, you also need to configure it by entering the needed settings.

1) First click on the enabled API as per image below: enter image description here

2) Then click on configuration. enter image description here

3) Then fill out the values as per below: enter image description here

4) Particularly important are (not shown here):

a) including correct oauth scopes (File->Project Prop->Scope from your script file)

b) Docs Add On Project Key (File->Project Properties->Info->Project key)

c) Docs Add On Script Version (from the developer console)

Now if you go back and publish you should no longer have the error

Tanya Gupta
  • 560
  • 4
  • 15
  • When I try configuring this I get error: "Project Key is not associated with current project or the script version doesn't exist." (see [SO](https://stackoverflow.com/questions/54523275/publishing-google-script-addon-to-g-suite-marketplace-sdk?noredirect=1#comment95999274_54523275) ) one person suggested that I have to publish to Chrome Store first- seems like I am in chicken-or-egg sistuation. Anyone know of a good tutorial (aka with lots of screenshots or video) that walk you through pubishing a Google Sheet Addon from scratch? – Nathan Feb 21 '19 at 19:47
  • 1
    Apps Marketplace SDK is not GSuite Marketplace SDK (see my answer). Following these instructions I mistakenly enabled Apps Marketplace API which didn't have a Configuration tab and I was totally confused (it was late at night :P) – Dagmar Mar 13 '19 at 07:49