Intermittent 401 scope errors on key with "All" permissions — spikes randomly, no config changes

We’ve been running a production application on the Assistants API for several months with no issues. Starting recently, we’re seeing intermittent spikes of 401 errors with the following message:

Error code: 401 - {‘error’: {‘message’: “You have insufficient permissions for this operation.
Missing scopes: api.threads.read.”, ‘type’: ‘invalid_request_error’, ‘param’: None, ‘code’: None}}

What makes this strange:

  • The API key shows “All” permissions in the OpenAI platform UI

  • The key has been working correctly for months

  • No changes were made to the key, the project, or any account settings

  • The errors are intermittent — the app runs fine most of the time, then spikes (e.g. thousands of errors in a short window around 10:00 AM UTC today, April 11 2026)

  • After the spike, it sometimes recovers on its own

Setup:

  • Python openai SDK version 1.35.7

  • Affected endpoints: beta.threads.runs.list, beta.threads.messages.create, beta.threads.runs.stream

What we’ve tried:

  • Verified the key shows “All” permissions in the UI

  • Created new API Keys

  • Confirmed only one key is in use (logging last-4 of the key on every request)

Question: Is this a known platform-side issue where project-level keys intermittently lose their granted scopes? We saw a similar incident reported by other users in August 2025.

4 Likes

Same issue, no code change, no key change, 401 error start happening when the key has ALL permissions

I tried the same things as the original post.

3 Likes

Hi and welcome to the community!

Thanks for raising this!
I have pinged the team to take a look.

5 Likes

Hi,

I have actually found my issue on my side, an uncatched exception in an asyncio task did actually create a corrupted client which then made the 401 Error

Hi, thank you for checking this. Please keep us posted on any updates, and let us know if you need any additional information on the issue.

2 Likes

same here.

getting random:

{error=>
{message=>
You have insufficient permissions for this operation. Missing scopes: api.threads.read. Check that you have the correct role in your organization (Reader, Writer, Owner) and project (Viewer, Member, Owner), and if you’re using a restricted API key, that it has the necessary scopes.,
type=>invalid_request_error,
param=>nil,
code=>nil}}
api key (user api key) have all permission and the error is intermittent

2 Likes

Getting the same thing. It started last night then cleared up. Now it is back around 3:30PM EST

3 Likes

Same error. Not working Assistant APIs with de same error :frowning:

1 Like

I’m experiencing the same issue. My API key is set with “All” permissions, but I’m still getting 401 errors like:

  • Missing scopes: api.threads.read

  • Missing scopes: model.request

This was working perfectly before and nothing changed on my side (same project, same key).

2 Likes

Same issue here. Worked for the past 6 months, now I am getting 401 spikes all of the sudden.

1 Like

it worked for almost an hour and now is failling again. Totally random.

1 Like

Hi. Any updates of this ? Please keep us posted.

Sorry, no updates yet.
Will keep you posted.

1 Like