On the next page, open Certificate and click on Generate Certificate and download the.p12 private key. Don't forget to note the email address and password that appear when downloading the key. To access google analytics with this key, you also need to give permission to the above email address in your analytics account.
Apr 13, 2020 Click Select a project, choose a project, and click Open. In the left nav, click Service accounts. Find the row of the service account that you want to create a. Mar 03, 2020 This guide shows how to create API keys, and how to set up API key restrictions, for Google Cloud applications. To learn more about authenticating to a Google Cloud API, see Authentication overview. For information about API keys for Google Maps Platform APIs and SDKs, see the Google Maps documentation.
To display your app in Google Drive when a user creates or opens a file,you must first configure a Drive UI integration. Configuration is alsorequired to list your app in the G Suite Marketplace.
Upload one or more icons to display in a user's list of connected Drive appsand in the 'Open with' context menu item. Icons should be in PNG format with atransparent background. Icons can ake up to 24 hours to appear in Drive.
Note: Document icons are deprecated. Your application icon appears next toshortcut and third-party shortcut files. A set of standard icons is used forother file types.If you want to allow users to use the Drive UI's 'Open with' context menuitem, enter a url to your app in the Open URL field. This URL is used by the'Open With' context menu item.
localhost
doesn't work.state
query parameter is appended to this URL to pass datafrom the Drive UI to your app. For information on the contents of thestate
parameter, refer toThe state
parameter.Enter default mime types and file extensions in theDefault Mime Types and Default File Extensions fields. Defaultmime types and file extensions represent files that your app is uniquely builtto open. For example, your app might open a native format for layering andediting images. Only include standardmedia typesor G Suite and Drive MIME typesand make sure they’re free of typos and misspellings. If your app only opensshortcut or third-party shortcut files, you can leave MIME type blank.
Enter secondary mime types and file extensions in the Secondary MimeTypes and Secondary File Extensions fields. Secondary mime types andfile extensions represent files that your app can open, but aren’t specific toyour app. For example, your app might be an image editing app that opens png andjpg images. Only include standardmedia typesor G Suite and Drive MIME typesand make sure they’re free of typos and misspellings. If your app only opensshortcut or third-party shortcut files, you can leave MIME type blank.
Note: If a user installs multiple Drive apps that can open a file, themost-recently installed app is used until the user chooses another app.If you want users to click on the Drive UI's New button and create a new filewith your app, check Allow users to create new documents using thisapplication. The New URL and Document Name fields appear.
localhost
doesn't work.state
query parameter is appended to this URL to pass datafrom the Drive UI to your app. For information on the contents of thestate
parameter, refer toThe state
parameter.Enter a url in the New URL field. This URL is used by the'New' button to redirect the user to your application.
Note: Leave the Document Name field blank. This field is no longer used.(Optional) If you want your app to be able to open G Suite-supportedfiles, check Importing.
(Optional) If your app needs to manipulate files on shared drives, checkShared drive support. For further information on how to support shareddrives in your app, refer to Implement shared drive support
Click Save Changes.
You must request thehttps://www.googleapis.com/auth/drive.install
scope to integrate withthe Drive UI. When requesting this scope, users see a dialog similar to this:
For more information about scopes you can request for Drive apps, and how torequest them, see What scope or scopes does my app need?
Note: If your app ispublished to the G Suite Marketplace, users anddomain administrators can search for and install the app directly from theG Suite Marketplace.state
parameterBy default, a state
parameter is appended to the Open and New URL to pass datafrom the Drive UI to your app. This parameter contains a JSON-encoded stringcontaining template variables with data about the request to your app. Thevariables included depend on the type of URL used (Open URL or New URL):
Template variable | Description | Applicable to which URL type? |
---|---|---|
{ids} | A comma-separated list of file IDs that are being opened. | Open URL |
{exportIds} | A comma-separated list of file IDs that are being exported (used only when opening native Google documents). | Open URL |
{folderId} | The id of the parent folder. | New URL |
{userId} | The profile ID that uniquely identifies the user. | Open URL and New URL |
{action} | The action being performed. This value is open when using an Open URL or create when using a New URL. | Open URL and New URL |
The state
parameter is URL-encoded, so your app must handle the escapecharacters and parse it as JSON. Apps can detect the create
value in thestate
parameter to verify that this is a request to create a new file.
The state
information for a New URL is:
The state
information for an Open URL is:
The ids are used to fetch file metadata and download file content. Once it hasthe file ID and an access token, your app can check permissions,fetch the file metadata, and download the file content as described in thereference documentation for files.get.
Note:An installed app needs to be able to handle create and open actionslaunched from the Drive UI. SeeHandle a New URLorHandle a Open URLto learn more.