Lost a few hours figuring this one out. Hope it helps.
Create a Service Account in Google Cloud Platform
- Sign in to your Google Cloud Platform (GCP) console (or create one if you don’t already have one)
- Navigate to IAM & Admin > Service accounts.
- Click Create Service Account.
- Enter a service account name and description.
- Click Create and Continue.
Add Roles
- I added Browser, Vertex AI administrator and Service Account Admin
- Click Done after setting the roles.
Generating a JSON Key
- In the Service accounts page, find your newly created service account, and click on it.
- Go to the Keys tab.
- Click Add Key, then Create new key.
- Choose JSON as a key type, and click Create. The JSON key file will be downloaded automatically.
Inside the file, there is the private_key and client_email that we need for the Bubble API connector.
Setting Up Bubble API Connector
- In your Bubble > Plugins > API Connector create a new API connection.
- For the Authentication type, select JSON Web Token.
- Scope =
https://www.googleapis.com/auth/cloud-platform
- ISS (account email) =
client_email
from JSON key - Access token endpoint:
https://oauth2.googleapis.com/token
- Private Key from JSON key removing the JSON encoding \n and replace with line feed (see example below)
- Scope =