Receiving 403 for all requests to Pinecone (HTTP header error - 'server':'envoy')

Hi team,

I’m on the free starter plan and have been playing around with the Python pinecone-client for the past few hours, however just recently I’ve begun receiving the following error for all requests:

ForbiddenException: (403)
Reason: Forbidden
HTTP response headers: HTTPHeaderDict({'content-length': '0', 'date': 'Sat, 22 Apr 2023 10:16:16 GMT', 'server': 'envoy'})

Even when working through the quickstart guide and performing

# Upsert sample data (5 8-dimensional vectors)
index.upsert([
    ("A", [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1]),
    ("B", [0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2]),
    ("C", [0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3]),
    ("D", [0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4]),
    ("E", [0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5])
])

I tried creating a recycling the API key that originally worked however the error I get now is:

UnauthorizedException: (401)
Reason: Unauthorized
HTTP response headers: HTTPHeaderDict({'www-authenticate': 'API key is missing or invalid for the environment "asia-northeast1-gcp". Check that the correct environment is specified.', 'content-length': '121', 'date': 'Sat, 22 Apr 2023 10:22:46 GMT', 'server': 'envoy'})
HTTP response body: API key is missing or invalid for the environment "asia-northeast1-gcp". Check that the correct environment is specified.

Have I potentially hit some sort of limit? Otherwise any other thoughts?

Thanks team!

I am getting the exact same issue

Any word on this? would appreciate any help

I’ve got the same. Waiting for help as well.

so I removed the default key , and and created a new one- now I am getting 401 Unauthorized error saying - API key is missing or invalid. I only have 1 project and 1 API key

1 Like

Yeah I’m getting a 401 for all new keys now … even when just trying to pinecone.list_indexes()

UnauthorizedException: (401)
Reason: Unauthorized
HTTP response headers: HTTPHeaderDict({'www-authenticate': 'API key is missing or invalid for the environment "asia-northeast1-gcp". Check that the correct environment is specified.', 'content-length': '121', 'date': 'Sun, 23 Apr 2023 00:05:42 GMT', 'server': 'envoy'})
HTTP response body: API key is missing or invalid for the environment "asia-northeast1-gcp". Check that the correct environment is specified.

same here - cannot proceed with any POC due to this

same even the guide cant run

Hi all,

We’re investigating an issue with API keys in the asia-northeast1-gcp region. Please subscribe to updates on our status page to keep abreast of the issue.

1 Like

Hi guys,
Is there any update on this issue?
I am facing the same.

I had the same issue while my new index was initializing. When it’s done, the issue is gone.

I have this issue as well

I’m facing the same issue, any fixes?

Hi all, I’m circling back on this to make sure people who face this in the future know what to do. Apologies to anyone who asked this and didn’t get a timely answer.

The most common cause of the 403 issue is that your connection to Pinecone has timed out due to inactivity. The solution here is to add error checking to your app, and if you get this error rerun pinecone.init() before running the query again. This is best done when using the official Pinecone clients; if you’re using the REST API it may be more difficult to add that kind of error checking.

So if you’re using the Python client it would be something like:

try:
    index.query(your_query)
except PineconeProtocolError:
    pinecone.init(api_key=api_key,environment=environment)
    index = pinecone.Index(your_index)
    index.query(your_query)

As with all code examples be sure to test this before running in production.