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 link https://console.cloud.google.com/projectselector2/apis/dashboard to select a project in the Google Developers Console. If a project is not yet created, perform these steps:
    1. Click CREATE PROJECT.
    2. Specify a project name and click CREATE.
  2. Click your project. On the left side of the page, select the OAuth consent screen tab.
  3. Specify your email address and a product name.
  4. Specify the URL in the Privacy Policy field. Add your domain name.
    Note: 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 that you are using.
  5. Click SAVE AND CONTINUE.
  6. Click ADD OR REMOVE SCOPES.
  7. Use the filter field to search Google Sheets API. If no result was found, click the link for Google API library: https://console.cloud.google.com/apis/library.
  8. Specify Google Sheets API in the search field and press the ENTER key. Click the result and click Enable.
  9. Go back to the OAUth consent screen tab, refresh the browser then repeat steps 5 - 7.
  10. Select …/auth/spreadsheets and …/auth/spreadsheets.readonly, and then click UPDATE.
  11. Check Your sensitive scopes as it must be updated with the selected API. Click SAVE AND CONTINUE.
  12. Select the Credential tab at the left side, and click + CREATE CREDENTIALS and then OAuth client ID.
  13. Select Web application for the application type then specify the application name.
  14. In the Authorized JavaScript origins field, specify the URL used for deployment. For example, https://m3.server.com.

    Optionally, leave the Authorized redirect URL field blank.

  15. Click CREATE.
    Note: The client ID in the resulting dialog box is used in the Google Sheets API Key field in the application settings. Also, take note of the project ID which is used 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.
  16. 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 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 screen 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.