Enabling Google Sheets API

You can visit https://developers.google.com/sheets/api/quickstart/js to validate if there are any changes in the steps indicated in this procedure.
  1. Use this wizard https://console.developers.google.com/start/api?id=sheets.googleapis.com to create or select a project in the Google Developers Console and automatically turn on the API. Click Continue, and then click Go to credentials.
  2. On the Add credentials of your project page, click Cancel.
  3. At the top of the page, select the OAuth consent screen tab. Specify an email address and a product name. Specify the URL in the Privacy Policy field. Click Save.
    Due to a new policy by Google, a Privacy Policy is required to have the API access verified. This Privacy Policy should be hosted within the domain of the H5 environment you are using.
  4. On the Credentials tab, click Create Credentials and select OAuth client ID.
  5. Select Web application for the application type.
  6. In the Authorized JavaScript origins field, specify the URL used for deployment. To ensure that you are using the correct URL, access the environment widget in M3 and obtain the URL of the H5 environment. When copying the URL, copy from https:// to .com, excluding /mne/.
    For example, copy https://m3.server.com.

    Optionally, leave the Authorized redirect URL field blank.

  7. Click Create.
    Note: The client ID in the resulting dialog box will be used in the Google Sheets API Key field in application settings. Take note of the project ID too. This is for the verification of the OAuth Client to be used in H5 Export to Google Sheets feature. You can download a JSON file containing this information by clicking the Project Name of your new project, then clicking the DOWNLOAD JSON link.
  8. Click OK to dismiss the resulting dialog.
    To prevent encountering the "unverified app" screen and having a limit to the number of users, clients can request for verification. Ensure that you have these requirements for app verification:
    • The page describing your app's privacy policy must be hosted within the domain.

    After you completed the requirements, you can request verification of the app's API use:

    1. Take note of the used scopes for Export to Google Sheets: https://www.googleapis.com/auth/spreadsheets.readonly and https://www.googleapis.com/auth/spreadsheets.
    2. Specify the Privacy Policy URL on the OAuth Consent Tab.
    3. Take note of the Client ID.
    4. In the Project settings, take note of the Project ID.
    5. File a review request of the project's OAuth.