You need to set up a Google API project for your app before it can make any API calls, so this is usually the first step in developing a Marketplace app. The project defines much of the configuration and services used by your app. To set up your project, you'll need to:
- Create the project in the Google API Console
- Select the Google services that your app will use
- Configure the G Suite Marketplace SDK and other services
- Set your app as a service account, if applicable
- Get the appropriate IDs and secrets or keys that your app will need to use
The following paragraphs explain these steps in more detail. Note that if you already have an existing application, you may skip steps 1 and 2.
Resources to get ready
Here are the required resources for setting up your project:
- Icons for your app at the following resolutions: 32x32, 48x48, 96x96, and 128x128 pixels
- You can also supply an icon for use in pop-up dialogs, which must be no larger than 60x120 pixels
- URLs for web server, authorization redirect callbacks, and product home page (optional)
Each of these resources will be needed in one or more of the steps described below.
Create a new project
Go to the Google API Console. Click Create Project, enter a name, and click Create.
Select the services to use
You need to go to the Google Developers Console and enable the G Suite Marketplace SDK, and enable the APIs or SDKs for any other services that your app requires. The app can only access Google services if you enable them here.
To activate an API for your project, do the following:
- Open the API Library in the Google Developers Console. If prompted, select a project or create a new one. The API Library lists all available APIs, grouped by product family and popularity.
- If the API you want to activate isn't visible in the list, use search to find it.
- Select the API you want to activate, then select the Enable API button.
After you have enabled an API, use the Enabled APIs link in the Console's API section to see a list of all your enabled APIs. From the list, you can disable and re-enable an API. Some APIs prompt you to accept their Terms of Service before you can activate them.
Configure the G Suite Marketplace SDK
Many services require additional configuration steps; the G Suite Marketplace SDK is one of these.
Use the Enabled APIs link in the API section of the Google API Console to see a list of all your enabled APIs. In the list, locate the G Suite Marketplace SDK, then click on its configuration icon. You'll need to configure each of the following settings:
- Application Info: enter the following details for your app:
- a short description for the app
- icons for each size
- select "Enable individual install" if you wish to allow this option (see below)
- Support URLs: enter a URL for your app's terms of service, and optionally for the other URL types listed
- Scopes: enter the OAuth2 scopes for the services your app will access
- Extensions: these settings enable app extensions (see below)
Click Save changes when you are done.
Enabling individual installs
Normally G Suite Marketplace apps are only visible and installable by G Suite domain administrators. You can choose to let individual users install your apps by selecting Enable individual install as shown below:
This interacts with the visibility options on the Chrome Web Store developer dashboard:
- If the visibility is Private, then only users in the domain can discover and install the app.
- If the visibility is Public, then any user, whether within a G Suite domain or simply any Gmail or other Google user, can discover and install the app.
About app extensions
This section of the pane lets you enable and configure several additional areas of functionality:
- Universal Navigation Extension This places a menu item for your app in the universal navigation bar, displayed at the top of the page in each Google app. You'll need to include a link URL in the field that appears.
- Drive Extension This makes your app a Google Drive app. You must also enable Google Drive SDK in the services pane. If you haven't configured the Google Drive SDK, you'll need to configure it now.
- COB Extension This enables your app to work with Gmail Contextual Gadgets. You must configure the parameters for this extension in the dialog that appears.
- Add-on Extensions You can publish add-ons for Google Sheets, Docs, and Forms. You need your script key and a list of OAuth scopes before you can use these extensions.
Configure additional services
If you have enabled other services that require configuration, these also show a configuration icon in the Enabled APIs list; configure each of these now. (To learn more about the configuration options for a service, refer to the documentation for that service.)
Create client IDs
You will need to create a client ID and secret key for your application. The type you create depends on the type of application you build. For example, if you want your application to be insallable by domain administrators by uses a service account, then in this step you need to ensure that you create the service account credentials.
Create a web application client ID
In the API Access pane, click Create an OAuth 2.0 Client ID.
- The Create Client ID dialog appears: In the branding section, enter the product name (required), product logo, and home page URL. When you're done, click Next.
- Click the Create client ID button.
- A dialog appears to let you download the private key for your service account. Click Download private key.
In the API Access pane, locate the section Client ID for web applications and note the client ID and client secret. You'll need these to make authentication calls from your app.
Create a service account client ID
Service accounts are optional in cases where you wish to have end users install your application individually.
However, if you wish to have your application installed for all users in a G Suite domain by a domain administrator, you should use a service account. Service accounts allow a G Suite domain administrators to grant service accounts domain-wide authority to access user data on behalf of users in the domain.
Service accounts are discussed in more detail in our Using OAuth 2.0 for Server to Server Applications documentation.
If your application uses a service account, you need to create a service account credentials.
- Click the Create Another Client ID… button.
- Click the Create client ID button.
In the API Access pane, locate the service account client ID and record it. Your app will need this ID, together with the private key you just downloaded, to make authentication calls from your service account.