Strapi returns 401 on custom plugin api on many ways

Hi, I want to trigger plugin api endpoint to create some new values.

When I made with custom way (native fetch or axios), send bearer token, server returns 401.

When I use strapi helpers like request or getFetchClient (post), catch 401 and redirect me to login page.

import { request } from "@strapi/helper-plugin";
import { getFetchClient } from '@strapi/helper-plugin';```

strapi version: "@strapi/strapi": "4.13.5", "react": "^18.2.0",

1 Like

Hi. Any luck finding a solution?

same issue here, Iā€™m moving a custom endpoint to a plugin and it stopped working because of this authorization issue. I understand that the plugin should be listed somehow in settings to apply a custom authentication, but not sure if this is the issue. any ideas?