Thanks for the reply!
This happened to me with the following code.
- axiosInstance.js
import { auth } from '@strapi/helper-plugin';
import axios from 'axios';
export const instance = axios.create({
baseURL: process.env.STRAPI_ADMIN_BACKEND_URL,
headers: {
Authorization: `Bearer ${auth.getToken()}`,
'Content-Type': 'application/json'
}
});
- src/pulugins/{plugin-name}/admin/src/components/{page-name}/index.jsx
React.useEffect(() => {
const getProducts = async () => {
const r = await axiosInstance.get(
`/content-manager/collection-types/api::product.product`
);
console.log(r);
};
getProducts();
}, []);
If you try to call the API in your own plugin like this, you will get a 403 error.

However, it can be made accessible by deleting the "visible": false statement.
Is there a problem with the way the API is called?
I would like to know the proper way to call it.