Skip to main content
All CollectionsAPISecurity and API Key Safety
How can I view the users or organizations associated with an API key?
How can I view the users or organizations associated with an API key?
Updated over 11 months ago

If you need to find the user and organizations associated with an API key, you can do so by calling the https://api.openai.com/v1/me endpoint, using the API key as the Bearer token.

Here's an example of what this would look like as a cURL call:

curl https://api.openai.com/v1/me \
-H "Authorization: Bearer $OPENAI_API_KEY"

This will return an object with the following structure (non-critical elements removed for convenience):

{
"object": "user",
"id": "user-1234",
"email": "user@yourcompany.com",
"name": "Users Name",
...
"orgs": {
"object": "list",
"data": [
{
"object": "organization",
"id": "org-abcd",
"title": "Org 1 Name",
...
},
{
"object": "organization",
"id": "org-1234",
"title": "Org 2 Name",
...
}
]

You can use this information to perform whatever follow up actions may be needed (for example: in the case of a leaked API key, contact the owner of the API key, and ask them to delete the key from here: https://platform.openai.com/account/api-keys).

Did this answer your question?