I have changed nothing. All of a sudden all of my api calls are getting the api error: “You are not permitted to view the requested resource”. I even renewed my api keys and I have set the api users to have maximum privileges. Why is this happening all of a sudden??
AI-generated summary
A user, depeters, reported that all API calls to their self-hosted Discourse instance suddenly began returning “You are not permitted to view the requested resource” errors, despite no changes on their end and even after renewing API keys and granting maximum privileges. Falco referenced a deprecation notice from April 2020, which ended support for API authentication via query params or request body, requiring HTTP headers instead. depeters questioned whether this could affect an unupdated, self-hosted instance, and later confirmed they had upgraded — which resolved the issue — but noted the errors began before the upgrade. blake and Stephen both emphasized that standalone self-hosted instances shouldn’t be affected by such changes unless manually updated or connected to external services. Stephen suggested that some external or underlying component may have changed, even if the container itself wasn’t updated. blake confirmed that an old self-hosted instance of theirs still works with legacy API methods, indicating the issue may be unique to depeters’s setup. The root cause remains unclear without more specific version or environmental details.
Are you using HTTP Headers for the API key?
Yes, I just saw this. So this will even affect a discourse instance I host myself and haven’t updated?
What exact version you are running?
I’ve since updated. I don’t have the old version number. It was almost a year old. But the errors started occurring before I updated.
Something is fishy if this somehow affected my self hosted non-updated instance.
Without more details, including those version numbers, it’s almost impossible to say.
It should be easy to say if you do something that would make a supposedly entirely standalone self hosted instance stop working due to some unknown integration with external services.
There is nothing that should affect a standalone self-hosted install like this that hasn’t been upgraded. Even if we backported a change to an older version, you wouldn’t receive it unless you manually updated your install. Discourse out of the box doesn’t come with any external services unless you set them up yourself, like email and google analytics.
I didn’t update anything and started getting 403 errors on all api calls. The only thing that fixed the errors was upgrading to the new version and changing request parameters to headers. Something is causing old versions to break due to the api changes even when they are standalone, self hosted and not being explicitly updated.
Change doesn’t occur without change. Something somewhere changed, whether you were aware of that change or not. If not in your container, then on one of the components outside it, or one of the connected systems.
This is all a lot of hand-waving without something tangible to look at though.
Yea I’m not sure. I have an old self hosted instance that still works the old api way. Glad you got it updated and working though.