Using admin key but getting 401 errors

I’m probably doing something dumb but I cant figure it out.

I’m trying to use the admin api calls, as specified on https://platform.openai.com/docs/api-reference/administration

As owner, I have created an admin key (granted it all permissions) but I keep get the below when I use any admin API (with admin API), such as using
https://api.openai.com/v1/organization/admin_api_keys.

Raw response for the API
Status code 401
{
“error”: {
“message”: “You have insufficient permissions for this operation. Missing scopes: api.management.write. Check that you have the correct role in your organization, and if you’re using a restricted API key, that it has the necessary scopes.”,
“type”: “invalid_request_error”,
“param”: null,
“code”: null
}
}

What am I missing?

9 Likes

I started getting this error randomly today. My key worked for 6 months and I did not change anything. I am reaching out to support.

2 Likes

Its the same with us. It suddenly does not work and gives 401

Exactly the same issue, getting following error:

 Unable to read, got status code 401: {
│   "error": {
│     "message": "You have insufficient permissions for this operation. Missing scopes: api.organization.projects.read. Check that you have the correct role in your organization, and if you're using a restricted API key, that it has the necessary scopes.",
│     "type": "invalid_request_error",
│     "param": null,
│     "code": null
│   }
│ }

Using Admin key with full permissions. The same key was working for months before.

I’m experiencing the exact same issue. I tried creating and using a new admin API key, but the error persists.

Thank you for reporting this issue. This has been escalated to OpenAI for further investigation.

6 Likes

I started getting this out of nowhere too. No changes on my side.

so 3 days admin operations are down and still not fixed.
right now we are not able to onboard new clients.

Same problem here. Please fix :folded_hands:

its very frustrating that this can be an ongoing issue for 3 days with no resolution. its not even consistent multiple endpoints still work just some dont.

I started having this issue today, it seems to be random because a few minutes ago it worked! :face_with_monocle:

+1, Having the same problem.

I’m sorry for the issues here—the API team’s looking into this now.

3 Likes

Fixed! You shouldn’t see these errors anymore.

10 Likes

Still does not work for me. Tried it a second ago, with an admin key. Also not with a new one I just created (and waited a few minutes)..

Hey @smit! Are you still seeing this error?

Just tried again with 3 different API admin calls, trying with 2 different admin keys and yes, I still get the same error. The admin keys have all permissions (see below extracts from the page, I replaced key with XXXX obviously).

  1. List item

Hey,

I’m using the admin key to access the following endpoint: GET to organization/invites, but I’m not receiving any response(timeout).
Could you provide an update on when this issue will be resolved?
Thank you!

It worked for me, without any changes on my code.

I tried it again today and still not working… I guess I’ll give up on this one.