Error connecting with Vertex AI on Google Cloud

I’m trying to connect with Vertex AI from my Bubble app. I followed the regular documentation provided by Google and generated the necessities (gcloud auth access-token, and other parameters) required by the given cURL API:

curl -X POST \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "Content-Type: application/json; charset=utf-8" \
    -d @request.json \

I followed the perfect JSON schema as well to call the API using the Bubble API Connector.

“contents”: [
“role”: “user”,
“parts”: { “text”: “Hello!” }

But when I call the API it shows this error (see image):

Note that the gcloud auth token expires very often; mostly after an hour, which should also cause an error. I tried multiple times within the time range and got the same error and showed the above error mentioning “reason”: “ACCESS_TOKEN_TYPE_UNSUPPORTED”.

How do I solve this ? Any suggestions would help.

PS: I don’t code

I may be able to help if you are using the bubble API connector.

Can you send a screen shot please?

I tried to call API for Search & Conversation API (runs on Vertex AI API) on Google Cloud. I used the below format as provided by Google Cloud website documentation:


When calling this API, I got this output: