# Authentication issue with Google API key in Weaviate

**URL:** <https://forum.weaviate.io/t/authentication-issue-with-google-api-key-in-weaviate/20276>\
**Category:** General\
**Created:** [March 24, 2025, 11:45am UTC](https://forum.weaviate.io/t/authentication-issue-with-google-api-key-in-weaviate/20276 "2025-03-24T11:45:56Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![maryannc](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/maryannc/32/3408_2.png) [@maryannc](https://forum.weaviate.io/u/maryannc)\
**Post date:** [March 24, 2025, 11:12pm UTC](https://forum.weaviate.io/t/authentication-issue-with-google-api-key-in-weaviate/20276/2 "2025-03-24T23:12:40Z")

</div>

Hi @Anushka_Sonawane ,

Good Day!

Welcome to Weaviate Community!

Could you try using X-Palm-Api-Key as a workaround on this issue? Found this related threads below which could be related on this issue:

> [@Can't connect to Google Vertex](https://forum.weaviate.io/t/cant-connect-to-google-vertex/3254/7):
>
> I am faced with the same problem, but using X-Palm-Api-Key does not seem to work. Vertex AI is not compatible with API Keys anymore, hence I am trying Oauth2, service acc or simply an access token. EDIT: It now uploads the properties, but does not vectorize. My cluster is 1.25.10 and my python dependency client is 4.7.1. I am basically running these lines client = weaviate.connect\_to\_weaviate\_cloud( cluster\_url=os.getenv("WEAVIATE\_URL"), auth\_credentials=weaviate.auth.AuthApiKey(api…

> <https://github.com/weaviate/weaviate-python-client/issues/1086>
>
> \### How to reproduce this bug?
> 
> To reproduce, use \`X-Google-Vertex-Api-Key\` as… a header and a vertex model with the Python client.
> 
> \`\`\`python
> \# This call doesn't work
> client = weaviate.connect\_to\_local(
> headers={
> "X-Google-Vertex-Api-Key": VERTEX\_AI\_KEY, # this doesn't work 
> # "X-Google-Api-Key": VERTEX\_AI\_KEY, # this works
> "X-Google-Studio-Api-Key": AI\_STUDIO\_KEY,
> }
> )
> 
> 
> collection = client.collections.create(
> name="ExampleCollection",
> 
> # Define & configure the vectorizer module
> vectorizer\_config=\[
> Configure.NamedVectors.text2vec\_palm(
> name="content",
> source\_properties=\["title"\],
> model\_id="text-embedding-004",
> 
> api\_endpoint="generativelanguage.googleapis.com",
> project\_id="devrel-projects",
> ),
> 
> Configure.NamedVectors.multi2vec\_palm(
> name="poster",
> source\_properties=\["title"\],
> model\_id="textembedding-gecko@003",
> 
> location="us-central1",
> project\_id="devrel-projects"
> )
> \],
> )
> 
> \# this will fail
> collection.data.insert({ "title": "a lazy brown fox that doesn't jump, because he is lazy"})
> \`\`\`
> 
> \### What is the expected behavior?
> 
> It should be possible to pass Vertex key \`X-Google-Vertex-Api-Key\` as the header.
> 
> \### What is the actual behavior?
> 
> \`X-Google-Vertex-Api-Key\` is not recognised by the Google module
> 
> \### Versions
> 
> Weaviate: 1.24.14
> Client: 4.6.1

This seems to be a google module issue which keys are not recognized on google’s end. Let me know if this works for you!

---

_[View the full topic](https://forum.weaviate.io/t/authentication-issue-with-google-api-key-in-weaviate/20276)._
