Connecting to Vertex AI - Step by step setup

Lost a few hours figuring this one out. Hope it helps.

Create a Service Account in Google Cloud Platform

  1. Sign in to your Google Cloud Platform (GCP) console (or create one if you don’t already have one)
  2. Navigate to IAM & Admin > Service accounts.
  3. Click Create Service Account.
  4. Enter a service account name and description.
  5. Click Create and Continue.

Add Roles

  1. I added Browser, Vertex AI administrator and Service Account Admin
  2. Click Done after setting the roles.

Generating a JSON Key

  1. In the Service accounts page, find your newly created service account, and click on it.
  2. Go to the Keys tab.
  3. Click Add Key, then Create new key.
  4. Choose JSON as a key type, and click Create. The JSON key file will be downloaded automatically.

:information_source: Inside the file, there is the private_key and client_email that we need for the Bubble API connector.

Setting Up Bubble API Connector

  1. In your Bubble > Plugins > API Connector create a new API connection.
  2. 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)

1 Like

Hey @dee ,

Thanks for the step by step guide you outlined. Could you elaborate the process of accessing a refresh token from GCP, as it changes every 58 mins.

Hi there. Just saw your message. I haven’t needed to change the key following the steps above. Have you tried contacting Google live support ?

No I haven’t contacted GCP support as of yet. I believe the GCP documentation provides expanded information on authentication process to get the job done. But the caviat is that I couldn’t find any way to actually integrate Vertex AI to Bubble in the no-code way; surely it can be done using code as there are available plugins maybe not suited for my needs but they exist.

The private key (JSON Web Token) method you should and I tried works superb for google calendar, but maybe not for Vertex AI (I could be wrong, but it didn’t work for me). I’ll give it another ry and update here

1 Like

Thanks for this, this worked all perfectly fine as long as I am logged in to the application.

However, when another user calls the same workflow as I do, they get a 400 error from Google. Any idea why?