[GH-ISSUE #19420] issue: Unable to create new api-keys - 403 forbidden #138597

Closed
opened 2026-05-25 10:56:08 -05:00 by GiteaMirror · 27 comments
Owner

Originally created by @DominikStarke on GitHub (Nov 24, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/19420

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

0.6.37 and 0.6.38

Ollama Version (if applicable)

No response

Operating System

macos

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

The user should be able to create an api key.

Actual Behavior

API responds with 403

Steps to Reproduce

Follow the official installation instructions, then try to create a new api-key in user settings dialogue

Logs & Screenshots

Image

Additional Information

API access is enabled in open-webui admin panel.

Originally created by @DominikStarke on GitHub (Nov 24, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/19420 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version 0.6.37 and 0.6.38 ### Ollama Version (if applicable) _No response_ ### Operating System macos ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior The user should be able to create an api key. ### Actual Behavior API responds with 403 ### Steps to Reproduce Follow the official installation instructions, then try to create a new api-key in user settings dialogue ### Logs & Screenshots <img width="1393" height="904" alt="Image" src="https://github.com/user-attachments/assets/da4783f6-2f02-4381-812a-e2f54b79a500" /> ### Additional Information API access is enabled in open-webui admin panel.
GiteaMirror added the bug label 2026-05-25 10:56:08 -05:00
Author
Owner

@cstueckrath commented on GitHub (Nov 24, 2025):

The api part doesn't even show up on my side.
And while api was disabled during update from 36 to 38 even enabling it later doesn't

  • enable it on settings side
  • allow previously working api keys.

Rolling back right now

<!-- gh-comment-id:3570786718 --> @cstueckrath commented on GitHub (Nov 24, 2025): The api part doesn't even show up on my side. And while api was disabled during update from 36 to 38 even enabling it later doesn't * enable it on settings side * allow previously working api keys. Rolling back right now
Author
Owner

@Classic298 commented on GitHub (Nov 24, 2025):

Did you guys enable the new API permission? Globally AND for users/groups?

<!-- gh-comment-id:3570797404 --> @Classic298 commented on GitHub (Nov 24, 2025): Did you guys enable the new API permission? Globally AND for users/groups?
Author
Owner

@DominikStarke commented on GitHub (Nov 24, 2025):

I have only the admin user and no groups.
Trying to create a key for the admin user yields the 403 error.

I did enable the global setting however.

Edit: Working as expected on 0.6.36

Somewhat different issue, but might be related: In 0.6.36 I was able to authenticate with the open-webui websocket using an api-key.
After updating the instance to 0.6.38 the old api-keys created in 0.6.36 were working for completion endpoint requests on the rest api, but for the socket the token has to be used.

<!-- gh-comment-id:3570807197 --> @DominikStarke commented on GitHub (Nov 24, 2025): I have only the admin user and no groups. Trying to create a key for the admin user yields the 403 error. I did enable the global setting however. Edit: Working as expected on 0.6.36 Somewhat different issue, but might be related: In 0.6.36 I was able to authenticate with the open-webui websocket using an api-key. After updating the instance to 0.6.38 the old api-keys created in 0.6.36 were working for completion endpoint requests on the rest api, but for the socket the token has to be used.
Author
Owner

@Classic298 commented on GitHub (Nov 24, 2025):

Again: Did you or did you not enable the new api key permission? This is a global setting. Check the changelogs. It is a new global toggle that will, even for admins, disable API keys if not enabled.

<!-- gh-comment-id:3570861241 --> @Classic298 commented on GitHub (Nov 24, 2025): Again: **Did you or did you not enable the new api key permission?** This is a global setting. Check the changelogs. It is a new global toggle that will, even for admins, disable API keys if not enabled.
Author
Owner

@DominikStarke commented on GitHub (Nov 24, 2025):

Yes, the global setting is enabled.

If I create a group "api-users", enable api for this group and then add the Admin user to the group I can create keys.
It seems I can't enable the api on a per-user basis (at least not for the admin)?

<!-- gh-comment-id:3570891395 --> @DominikStarke commented on GitHub (Nov 24, 2025): Yes, the global setting is enabled. If I create a group "api-users", enable api for this group and then add the Admin user to the group I can create keys. It seems I can't enable the api on a per-user basis (at least not for the admin)?
Author
Owner

@Classic298 commented on GitHub (Nov 24, 2025):

@DominikStarke

If I create a group "api-users", enable api for this group and then add the Admin user to the group I can create keys.

Good, then it works

It seems I can't enable the api on a per-user basis (at least not for the admin)?

You need to create a group, give this group api key permission OR enable the api key permission for all USER role users with the default permissions.

<!-- gh-comment-id:3570899902 --> @Classic298 commented on GitHub (Nov 24, 2025): @DominikStarke > If I create a group "api-users", enable api for this group and then add the Admin user to the group I can create keys. Good, then it works > It seems I can't enable the api on a per-user basis (at least not for the admin)? You need to create a group, give this group api key permission **OR** enable the api key permission for all USER role users with the default permissions.
Author
Owner

@cstueckrath commented on GitHub (Nov 24, 2025):

Yeah, right - after downgrading likely killed LDAP, I went forward again and looked for that settings in users, found it, and now it's back again.

You might want to highlight those breaking changes on top of the change popup ;)

<!-- gh-comment-id:3570906850 --> @cstueckrath commented on GitHub (Nov 24, 2025): Yeah, right - after downgrading likely killed LDAP, I went forward again and looked for that settings in users, found it, and now it's back again. You might want to highlight those breaking changes on top of the change popup ;)
Author
Owner

@Classic298 commented on GitHub (Nov 24, 2025):

@cstueckrath It is literally in the Changed section (which is for breaking changes) in the changelogs

From the changelog - changed section:

🔐 API key creation is now controlled by granular user and group permissions, with the "ENABLE_API_KEY" environment variable renamed to "ENABLE_API_KEYS" and disabled by default, requiring explicit configuration at both the global and user permission levels, while related environment variables "ENABLE_API_KEY_ENDPOINT_RESTRICTIONS" and "API_KEY_ALLOWED_ENDPOINTS" were renamed to "ENABLE_API_KEYS_ENDPOINT_RESTRICTIONS" and "API_KEYS_ALLOWED_ENDPOINTS" respectively. https://github.com/open-webui/open-webui/pull/18336

https://github.com/open-webui/open-webui/releases/tag/v0.6.37

And therefore it is also inside the popup

<!-- gh-comment-id:3570909685 --> @Classic298 commented on GitHub (Nov 24, 2025): @cstueckrath It is literally in the Changed section (which is for breaking changes) in the changelogs From the changelog - changed section: > 🔐 API key creation is now controlled by granular user and group permissions, with the "ENABLE_API_KEY" environment variable renamed to "ENABLE_API_KEYS" and disabled by default, requiring explicit configuration at both the global and user permission levels, while related environment variables "ENABLE_API_KEY_ENDPOINT_RESTRICTIONS" and "API_KEY_ALLOWED_ENDPOINTS" were renamed to "ENABLE_API_KEYS_ENDPOINT_RESTRICTIONS" and "API_KEYS_ALLOWED_ENDPOINTS" respectively. https://github.com/open-webui/open-webui/pull/18336 https://github.com/open-webui/open-webui/releases/tag/v0.6.37 And therefore it is also inside the popup
Author
Owner

@cstueckrath commented on GitHub (Nov 24, 2025):

yeah, what I ment was like "on the top of that page"

It's our test environment, so nothing bad happened, but if I get something authorization related turned off while doing a minor update, I'd like to get a heads up regardless.

<!-- gh-comment-id:3570937666 --> @cstueckrath commented on GitHub (Nov 24, 2025): yeah, what I ment was like "on the top of that page" It's our test environment, so nothing bad happened, but if I get something authorization related turned off while doing a minor update, I'd like to get a heads up regardless.
Author
Owner

@Classic298 commented on GitHub (Nov 24, 2025):

@cstueckrath
aha so you want changed on top of the list?
fw.

<!-- gh-comment-id:3570948437 --> @Classic298 commented on GitHub (Nov 24, 2025): @cstueckrath aha so you want changed on top of the list? fw.
Author
Owner

@cstueckrath commented on GitHub (Nov 24, 2025):

as this was a breaking change, I'd love to see those on top, yes. Like:

Breaking Changes
⚠️ When updating to 0.6.37 or higher, API keys will be disabled. See Changed section for more details.
Added
Fixed
Changed

<!-- gh-comment-id:3571030975 --> @cstueckrath commented on GitHub (Nov 24, 2025): as this was a breaking change, I'd love to see those on top, yes. Like: Breaking Changes ⚠️ When updating to 0.6.37 or higher, API keys will be disabled. See Changed section for more details. Added Fixed Changed
Author
Owner

@Classic298 commented on GitHub (Nov 24, 2025):

@cstueckrath modifications to the structure require code changes.

What i think is possible without changing the code would be simply moving the # changed section TO THE TOP as a whole.

Wdyt?

<!-- gh-comment-id:3571046100 --> @Classic298 commented on GitHub (Nov 24, 2025): @cstueckrath modifications to the structure require code changes. What i think is possible without changing the code would be simply moving the # changed section TO THE TOP as a whole. Wdyt?
Author
Owner

@cstueckrath commented on GitHub (Nov 24, 2025):

would work for me, too.

<!-- gh-comment-id:3571060437 --> @cstueckrath commented on GitHub (Nov 24, 2025): would work for me, too.
Author
Owner

@sanchitbhavsar commented on GitHub (Nov 24, 2025):

@Classic298 I am also affecting with the issue, i migrated to latest version now and the API key section does not appear and we have many tools which used the backend are failing due to this cannot be performed in the current environment because the required API key configuration is missing or disabled.

What exactly needs to be done ion order to have it working again? If I understood, we need to pass this env variable ENABLE_API_KEYS with "true"? and where can i see the setting on app to enable on user level.

<!-- gh-comment-id:3571950643 --> @sanchitbhavsar commented on GitHub (Nov 24, 2025): @Classic298 I am also affecting with the issue, i migrated to latest version now and the API key section does not appear and we have many tools which used the backend are failing due to this `cannot be performed in the current environment because the required API key configuration is missing or disabled.` What exactly needs to be done ion order to have it working again? If I understood, we need to pass this env variable ENABLE_API_KEYS with "true"? and where can i see the setting on app to enable on user level.
Author
Owner

@Classic298 commented on GitHub (Nov 24, 2025):

@sanchitbhavsar

enable API Keys in settings > general

and also enable api keys for the user role or for specific groups in the user/group permissions

<!-- gh-comment-id:3571978117 --> @Classic298 commented on GitHub (Nov 24, 2025): @sanchitbhavsar enable API Keys in settings > general and also enable api keys for the user role or for specific groups in the user/group permissions
Author
Owner

@sanchitbhavsar commented on GitHub (Nov 24, 2025):

@sanchitbhavsar

enable API Keys in settings > general

and also enable api keys for the user role or for specific groups in the user/group permissions

Thanks @Classic298 How can i enable for user role?

<!-- gh-comment-id:3572023879 --> @sanchitbhavsar commented on GitHub (Nov 24, 2025): > [@sanchitbhavsar](https://github.com/sanchitbhavsar) > > enable API Keys in settings > general > > and also enable api keys for the user role or for specific groups in the user/group permissions Thanks @Classic298 How can i enable for user role?
Author
Owner

@Classic298 commented on GitHub (Nov 24, 2025):

in the user settings in the admin panel

<!-- gh-comment-id:3572033115 --> @Classic298 commented on GitHub (Nov 24, 2025): in the user settings in the admin panel
Author
Owner

@sanchitbhavsar commented on GitHub (Nov 25, 2025):

in the user settings in the admin panel

It is only possible in the user group setting and not for individual user

Image
<!-- gh-comment-id:3574435364 --> @sanchitbhavsar commented on GitHub (Nov 25, 2025): > in the user settings in the admin panel It is only possible in the user group setting and not for individual user <img width="732" height="111" alt="Image" src="https://github.com/user-attachments/assets/c0941dd1-3219-48a4-9be0-49a1dee2f8b9" />
Author
Owner

@Classic298 commented on GitHub (Nov 25, 2025):

You can only toggle it for all users (user role default permissions) or on group basis.

The permission system does not allow to toggle it for individual users.

If you want individual users to have it, just put them all in the same group and give them the api keys permission

<!-- gh-comment-id:3574445652 --> @Classic298 commented on GitHub (Nov 25, 2025): You can only toggle it for all users (user role default permissions) or on group basis. The permission system does not allow to toggle it for individual users. If you want individual users to have it, just put them all in the same group and give them the api keys permission
Author
Owner

@DominikStarke commented on GitHub (Nov 25, 2025):

Is it possible to display an "insufficient permissions" warning in the users settings?

<!-- gh-comment-id:3574782696 --> @DominikStarke commented on GitHub (Nov 25, 2025): Is it possible to display an "insufficient permissions" warning in the users settings?
Author
Owner

@matthias-ccri commented on GitHub (Nov 26, 2025):

This was very much a breaking change, as @cstueckrath pointed out.

In general, any change that requires configuration changes in order to preserve existing behavior or functionality is a breaking change.

the "ENABLE_API_KEY" environment variable renamed to "ENABLE_API_KEYS"

This is a breaking change --- users who still have the old env var will break unless they change their configuration.

and disabled by default

This is a breaking change --- the feature will disappear for users who don't have the env var unless they change their configuration.

Not sure who needs to be tagged, but please mark these properly as BREAKING in the future.

<!-- gh-comment-id:3583235874 --> @matthias-ccri commented on GitHub (Nov 26, 2025): This was very much a breaking change, as @cstueckrath pointed out. In general, any change that _requires configuration changes_ in order to preserve existing behavior or functionality is a breaking change. > the "ENABLE_API_KEY" environment variable renamed to "ENABLE_API_KEYS" This is a breaking change --- users who still have the old env var will break _unless they change their configuration_. > and disabled by default This is a breaking change --- the feature will disappear for users who don't have the env var _unless they change their configuration_. Not sure who needs to be tagged, but please mark these properly as `BREAKING` in the future.
Author
Owner

@Classic298 commented on GitHub (Nov 26, 2025):

Anything mentioned in the Changed section is a potentially breaking change

<!-- gh-comment-id:3583342694 --> @Classic298 commented on GitHub (Nov 26, 2025): Anything mentioned in the Changed section is a potentially breaking change
Author
Owner

@matthias-ccri commented on GitHub (Dec 1, 2025):

@Classic298 that's correct, but it sounds like you're saying it was our fault for not considering that. Actually, if a changelog has certain changes marked as "breaking", then the assumption is that breaking changes are marked.

Consider if you were upgrading some software and reading a changelog to look for breaking changes. Do you want to have to figure it out yourself? Or would you prefer for that software to point out any breaking changes? Obviously the latter.

So, a good changelog highlights breaking changes, because they're infinitely more important than literally anything else in the changelog. Probably 99% of changelog readers are there for one thing: to scan for breaking changes. This is very important to realize.

So again: please mark breaking changes properly as BREAKING in the future, and do not burden the reader by making them read through every minute point in your changelog in order to identify breaking changes.

<!-- gh-comment-id:3597875869 --> @matthias-ccri commented on GitHub (Dec 1, 2025): @Classic298 that's correct, but it sounds like you're saying it was our fault for not considering that. Actually, if a changelog has certain changes marked as "breaking", then the assumption is that breaking changes are marked. Consider if you were upgrading some software and reading a changelog to look for breaking changes. Do you want to have to figure it out yourself? Or would you prefer for that software to point out any breaking changes? Obviously the latter. So, a good changelog highlights breaking changes, because they're infinitely more important than _literally anything else_ in the changelog. Probably 99% of changelog readers are there for one thing: to scan for breaking changes. This is very important to realize. So again: **please mark breaking changes properly as `BREAKING` in the future**, and do not burden the reader by making them read through every minute point in your changelog in order to identify breaking changes.
Author
Owner

@Classic298 commented on GitHub (Dec 1, 2025):

@matthias-ccri

you dont need to scan the entire changelog.

Again: anything in the Changed Section is potentially breaking (depending on your setup).

You only need to read the Changed section which is always very small.

<!-- gh-comment-id:3597906184 --> @Classic298 commented on GitHub (Dec 1, 2025): @matthias-ccri you dont need to scan the entire changelog. **Again: anything in the Changed Section is potentially breaking (depending on your setup).** You only need to read the Changed section which is always very small.
Author
Owner

@Steff81 commented on GitHub (Dec 1, 2025):

I found it only after 30minutes until finding this post. I use Watchtower to update openwebui, so i will not regularly read the Changelog. How many security stages do you need, honestly. Deactivating the API keys on user permission level should be enough or not?

<!-- gh-comment-id:3598442302 --> @Steff81 commented on GitHub (Dec 1, 2025): I found it only after 30minutes until finding this post. I use Watchtower to update openwebui, so i will not regularly read the Changelog. How many security stages do you need, honestly. Deactivating the API keys on user permission level should be enough or not?
Author
Owner

@eslowney commented on GitHub (Dec 3, 2025):

It took me until just now to discover that there's a "Group" tab under the Users (sorry, "Overview") tab that lists a "Default permissions" group. You have to click into this settings page and then scroll down to find the API keys section and enable it there.

We have been using Open WebUI for months with a dozen users and I had never discovered that setting menu until just now.

<!-- gh-comment-id:3604528363 --> @eslowney commented on GitHub (Dec 3, 2025): It took me until just now to discover that there's a "Group" tab under the Users (sorry, "Overview") tab that lists a "Default permissions" group. You have to click into this settings page and then scroll down to find the API keys section and enable it there. We have been using Open WebUI for months with a dozen users and I had never discovered that setting menu until just now.
Author
Owner

@martijnn commented on GitHub (Dec 3, 2025):

Technically the changelog text 🔐 API key creation is not correct. Since after upgrading, my existing api keys didn't work anymore.

Besides, I also prefer to see Breaking Changes instead of Changes. It's more common and user friendly.

<!-- gh-comment-id:3606854179 --> @martijnn commented on GitHub (Dec 3, 2025): Technically the changelog text `🔐 API key creation` is not correct. Since after upgrading, my existing api keys didn't work anymore. Besides, I also prefer to see Breaking Changes instead of Changes. It's more common and user friendly.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#138597