Google Sheets

← Back OAuth data source setup

Prerequisites

Make sure you use BGDatabase version >= 1.7.6 (Settings->Main) and GoogleSheets plug-in version >= 1.5 (Plug-ins->GoogleSheets integration For Editor)

Create Google client Id

Here is our step-by-step guide how to do it (alternatively use this Google support article)

  1. Log in to Google Console
  2. Select or create a project
  3. Enable GoogleSheets API if it's disabled. Wait several minutes after enabling API. ( Google's guide, search for sheets)
  4. Make sure your project state is "In production" under "Oauth consent screen", otherwise your tokens may expire every week, and you will need to renew them.
  5. Select Credentials , click on Create credentials and choose Oath client Id
  6. Select Desktop app and click Create
  7. A popup will show up with your client id and client secret. Copy them to your Datasource settings
  8. Fill Application name with any value
  9. Open up your spreadsheet in your browser, copy the URL, click on Retrieve from URL button, paste the URL and click on Parse button to fill Spreadsheet ID (alternatively read this article to learn how to obtain SpreadsheetID)

Get Oath tokens from Google

  1. Click on Get new tokens button
  2. Your browser will open up, with login screen. Login to your Google account.
  3. At this point warning screen may appear, saying application is not verified. Click on "Advanced" and then "Go"
  4. Next screen let you grant a permission to access Google Sheets. Click on "Allow"
  5. [Last step] After that there are 2 possible scenarios:
    Scenario #1
    The following page will be displayed in your browser:
    Close this page and switch back to Unity - tokens values should be updated. Save the settings. The end of the guide.
    Scenario #2
    The following page will be displayed in your browser:
    In this case, copy URL from browser to text editor and locate the code HTTP GET parameter value. Copy it to the clipboard (Ctrl+c).
    Switch back to Unity Editor, click on "I want to enter code manually" button in the "Google token receiver" window and paste code value to "Code" parameter and press on "Go!" button
    Tokens values should be updated. Save the settings.
← Back to Google Sheets