# 401 Unauthorized exception calling the API

**URL:** <https://community.pinecone.io/t/401-unauthorized-exception-calling-the-api/5096>\
**Category:** Support\
**Tags:** vector-database, error-401\
**Created:** [April 4, 2024, 9:06pm UTC](https://community.pinecone.io/t/401-unauthorized-exception-calling-the-api/5096 "2024-04-04T21:06:31Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![it1](https://avatars.discourse-cdn.com/v4/letter/i/9de0a6/32.png) [@it1](https://community.pinecone.io/u/it1)\
**Post date:** [April 4, 2024, 9:06pm UTC](https://community.pinecone.io/t/401-unauthorized-exception-calling-the-api/5096/1 "2024-04-04T21:06:31Z")

</div>

All our requests to Pinecone started failing today with a 401 Unauthorized exception. The stacktrace is unhelpful:

```auto
Failed to retrieve response: PineconeAuthorizationError: The API key you provided was rejected while calling https://xxx-yyy.svc.gcp-starter.pinecone.io/query. Please check your configuration values and try again. You can find the configuration values for your project in the Pinecone developer console at [https://app.pinecone.io](https://app.pinecone.io/)
at mapHttpStatusError (webpack-internal:///(rsc)/./node_modules/@pinecone-database/pinecone/dist/errors/http.js:181:20)
at eval (webpack-internal:///(rsc)/./node_modules/@pinecone-database/pinecone/dist/errors/handling.js:170:55)
at step (webpack-internal:///(rsc)/./node_modules/@pinecone-database/pinecone/dist/errors/handling.js:107:23)
at Object.eval [as next] (webpack-internal:///(rsc)/./node_modules/@pinecone-database/pinecone/dist/errors/handling.js:48:20)
at fulfilled (webpack-internal:///(rsc)/./node_modules/@pinecone-database/pinecone/dist/errors/handling.js:11:32)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
cause: undefined

```

We repeated the query with a new API key, and also tried calling the index from Python. Both failed. The Pinecone console also fails to load the index via the ‘Browse’ tab. The `describe_index_stats` API call on the console fails with a 401 Unauthorized error with the following response headers:

```auto
Access-Control-Allow-Origin: [https://app.pinecone.io](https://app.pinecone.io/)
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Content-Length: 12
Content-Type: text/plain
Date: Thu, 04 Apr 2024 20:35:17 GMT
Server: envoy
Via: 1.1 google
Www-Authenticate: Malformed domain
X-Pinecone-Auth-Rejected-Reason: Malformed domain

```

I can understand if the server is down, but that’s not the exception message I would expect in that case. How can we fix this error?

---

<div class="post-metadata">

**Author:** ![mehmetbilentr](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/mehmetbilentr/32/2383_2.png) [@mehmetbilentr](https://community.pinecone.io/u/mehmetbilentr)\
**Post date:** [April 4, 2024, 9:14pm UTC](https://community.pinecone.io/t/401-unauthorized-exception-calling-the-api/5096/2 "2024-04-04T21:14:53Z")

</div>

I have started to get a similar error suddenly. I am not sure if I did something wrong or is it a pinecone server related issue.

```auto
UnauthorizedException: (401)

Reason: Unauthorized
HTTP response headers: HTTPHeaderDict({'x-pinecone-auth-rejected-reason': 'Malformed domain', 'www-authenticate': 'Malformed domain', 'Content-Length': '12', 'content-type': 'text/plain', 'date': 'Thu, 04 Apr 2024 21:13:28 GMT', 'server': 'envoy', 'Via': '1.1 google', 'Alt-Svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000'})
HTTP response body: Unauthorized

```

---

<div class="post-metadata">

**Author:** ![it1](https://avatars.discourse-cdn.com/v4/letter/i/9de0a6/32.png) [@it1](https://community.pinecone.io/u/it1)\
**Post date:** [April 4, 2024, 9:30pm UTC](https://community.pinecone.io/t/401-unauthorized-exception-calling-the-api/5096/3 "2024-04-04T21:30:53Z")

</div>

We are on a starter index, what about you? It might be an issue impacting only starter indexes, although I don’t see incidents on the status page [https://status.pinecone.io/](https://status.pinecone.io/)

I created a support ticket, but was basically told they couldn’t help us because we aren’t a paying customer. Well, if the status page or exception message were helpful, I could figure something out, but at the moment we’re pretty stuck!

---

<div class="post-metadata">

**Author:** ![tarsi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/tarsi/32/2384_2.png) [@tarsi](https://community.pinecone.io/u/tarsi)\
**Post date:** [April 4, 2024, 9:33pm UTC](https://community.pinecone.io/t/401-unauthorized-exception-calling-the-api/5096/4 "2024-04-04T21:33:43Z")

</div>

I’m experiencing the same issue on the starter plan, was working fine a few hours ago

---

<div class="post-metadata">

**Author:** ![mehmetbilentr](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/mehmetbilentr/32/2383_2.png) [@mehmetbilentr](https://community.pinecone.io/u/mehmetbilentr)\
**Post date:** [April 4, 2024, 9:42pm UTC](https://community.pinecone.io/t/401-unauthorized-exception-calling-the-api/5096/5 "2024-04-04T21:42:24Z")

</div>

Starter index too, and yes it was working a while ago.

---

<div class="post-metadata">

**Author:** ![Cory\_Pinecone](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/cory_pinecone/32/1712_2.png) [@Cory\_Pinecone](https://community.pinecone.io/u/Cory_Pinecone)\
**Post date:** [April 4, 2024, 10:40pm UTC](https://community.pinecone.io/t/401-unauthorized-exception-calling-the-api/5096/6 "2024-04-04T22:40:04Z")

</div>

Hi folks, let me look into this for you. I’ll update as soon as I know more.

---

<div class="post-metadata">

**Author:** ![connect](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/connect/32/1199_2.png) [@connect](https://community.pinecone.io/u/connect)\
**Post date:** [April 4, 2024, 10:47pm UTC](https://community.pinecone.io/t/401-unauthorized-exception-calling-the-api/5096/7 "2024-04-04T22:47:28Z")

</div>

Hello, I am facing the same problem.

The API doesn’t work and the platform keeps loading forever

---

<div class="post-metadata">

**Author:** ![patrick1](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/patrick1/32/1863_2.png) [@patrick1](https://community.pinecone.io/u/patrick1)\
**Post date:** [April 4, 2024, 10:50pm UTC](https://community.pinecone.io/t/401-unauthorized-exception-calling-the-api/5096/8 "2024-04-04T22:50:23Z")

</div>

Hello @connect,

I moved your post as I suspect it might be related to this thread. Can you please tell us what error message you’re getting?

---

<div class="post-metadata">

**Author:** ![Cory\_Pinecone](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/cory_pinecone/32/1712_2.png) [@Cory\_Pinecone](https://community.pinecone.io/u/Cory_Pinecone)\
**Post date:** [April 4, 2024, 11:46pm UTC](https://community.pinecone.io/t/401-unauthorized-exception-calling-the-api/5096/9 "2024-04-04T23:46:01Z")

</div>

Good news, this is resolved, and the free indexes should be working again.

---

<div class="post-metadata">

**Author:** ![raghu.datascientist1](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/raghu.datascientist1/32/2401_2.png) [@raghu.datascientist1](https://community.pinecone.io/u/raghu.datascientist1)\
**Post date:** [April 8, 2024, 1:30pm UTC](https://community.pinecone.io/t/401-unauthorized-exception-calling-the-api/5096/10 "2024-04-08T13:30:12Z")

</div>

Give environment =“gcp-starter”

---

<div class="post-metadata">

**Author:** ![rayking99](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/rayking99/32/2409_2.png) [@rayking99](https://community.pinecone.io/u/rayking99)\
**Post date:** [April 11, 2024, 6:40am UTC](https://community.pinecone.io/t/401-unauthorized-exception-calling-the-api/5096/11 "2024-04-11T06:40:14Z")

</div>

Hi - This is occuring again by the looks of it. Any workarounds available?

pinecone.core.client.exceptions.UnauthorizedException: (401)  
Reason: Unauthorized  
HTTP response headers: HTTPHeaderDict({‘Date’: ‘Thu, 11 Apr 2024 06:39:53 GMT’, ‘Content-Type’: ‘text/plain’, ‘Content-Length’: ‘12’, ‘Connection’: ‘keep-alive’, ‘x-pinecone-auth-rejected-reason’: ‘Malformed domain’, ‘www-authenticate’: ‘Malformed domain’, ‘server’: ‘envoy’})  
HTTP response body: Unauthorized

---

<div class="post-metadata">

**Author:** ![patrick1](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/patrick1/32/1863_2.png) [@patrick1](https://community.pinecone.io/u/patrick1)\
**Post date:** [April 11, 2024, 10:25am UTC](https://community.pinecone.io/t/401-unauthorized-exception-calling-the-api/5096/12 "2024-04-11T10:25:07Z")

</div>

Hello @rayking99,

We are aware of an issue affecting some of the Serverless and Starter indexes. We are currently investigating and will update our [status](https://status.pinecone.io/) with the progress.

---

<div class="post-metadata">

**Author:** ![patrick1](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/patrick1/32/1863_2.png) [@patrick1](https://community.pinecone.io/u/patrick1)\
**Post date:** [April 11, 2024, 6:49pm UTC](https://community.pinecone.io/t/401-unauthorized-exception-calling-the-api/5096/13 "2024-04-11T18:49:12Z")

</div>

This issue has been resolved.

---

<div class="post-metadata">

**Author:** ![patrick1](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/patrick1/32/1863_2.png) [@patrick1](https://community.pinecone.io/u/patrick1)\
**Post date:** [April 17, 2024, 6:31pm UTC](https://community.pinecone.io/t/401-unauthorized-exception-calling-the-api/5096/14 "2024-04-17T18:31:36Z")

</div>

Split this topic on April 17, 2024, 6:31pm UTC

A post was split to a new topic: [Getting 401 Errors](https://community.pinecone.io/t/getting-401-errors/5247)

---

<div class="post-metadata">

**Author:** ![patrick1](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/patrick1/32/1863_2.png) [@patrick1](https://community.pinecone.io/u/patrick1)\
**Post date:** [April 17, 2024, 6:32pm UTC](https://community.pinecone.io/t/401-unauthorized-exception-calling-the-api/5096/15 "2024-04-17T18:32:15Z")

</div>

Closed on April 17, 2024, 6:32pm UTC


