Obtaining Google service account keys

Service Account 101:

How to get service account keys

Go to your project in google console dashboard https://console.developers.google.com

1. Enable Drive API and Sheets API

For that in the navigation menu select APIs & Services then Library.
Image without caption
  1. Search for Google Drive API, select it, and click on ENABLE.
Image without caption
Image without caption
Image without caption
2. Now search for Google Sheets API and enable it as well.
Note: For other APIs (e.g. Calendar, Maps etc.) please enable those APIs in the Google Cloud Platform

2. Create service account

In the navigation menu select IAM & admin and click on Service Accounts. See in the image below:
Image without caption
  1. Click on the top button CREATE SERVICE ACCOUNT;
  1. Add a name and an id and then click CREATE;
  1. Give this account 2 roles one of Owner to have full access and one of Service Account Admin;
  1. Save and CONTINUE.
Image without caption
Image without caption

3. Creating Keys

On the next step scroll to the bottom and click on CREATE KEY and select JSON type of key and then click CREATE, a file with the key will be downloaded, it will be in JSON format.
Image without caption
Open the (.json) file in any text editor and copy client_email - (e.g: zeroqode-demo@zq-bot.iam.gserviceaccount.com) without quotes.
Image without caption

4. Adding the keys in Bubble Google Sheets plugin

Paste it in email settings in the Iss (account email) field in plugin settings in Bubble editor:
Image without caption
Note: This next step is very important so be careful!
Now copy private_key (the edited one) to plugin settings in Bubble editor:
Image without caption
Before that, however, the key should be edited first.
You will need to remove only all the "\n" and "=" characters from it and replace them with <-Enter. This is from official Google documentation (https://developers.google.com/shopping-content/v2/orders-best-practices)
Image without caption
After you did that, paste this key in plugin settings, it should look like this:
Image without caption
You're all set to work with a Service Account.